From d8d10c2a6087eaeaa890ca041ce820a75c546eb8 Mon Sep 17 00:00:00 2001 From: 0x5BFA <62196528+0x5bfa@users.noreply.github.com> Date: Sun, 30 Apr 2023 23:31:59 +0900 Subject: [PATCH] Code Quality: Introduce a new data storage namespace (#12233) --- .../Actions/FileSystem/FormatDriveAction.cs | 2 +- .../Actions/FileSystem/PasteItemAction.cs | 2 +- .../FileSystem/PasteItemToSelectionAction.cs | 2 +- src/Files.App/App.xaml.cs | 2 +- src/Files.App/BaseLayout.cs | 2 ++ .../Bundles/BundlesOpenPathEventArgs.cs | 2 +- .../EventArguments/LayoutModeEventArgs.cs | 2 +- .../LayoutPreferenceEventArgs.cs | 2 +- ...ecurityAdvancedAccessControlItemFactory.cs | 2 +- .../Items}/DriveItem.cs | 4 +-- .../Items}/FileTagItem.cs | 2 +- .../Items}/INavigationControlItem.cs | 2 +- .../Items}/LocationItem.cs | 2 +- .../NavigationViewItemButtonStyleItem.cs | 3 +- .../PropertiesNavigationViewItemFactory.cs | 10 ++---- .../Items}/WslDistroItem.cs | 2 +- .../{DataModels => Data/Models}/AppModel.cs | 2 +- .../Models}/BitmapImageModel.cs | 2 +- .../Models}/SidebarPinnedModel.cs | 4 +-- .../Models}/SuggestionModel.cs | 2 +- .../PropertiesPageNavigationParameter.cs | 2 +- .../Dialogs/ReorderSidebarItemsDialog.xaml | 4 +-- .../Dialogs/ReorderSidebarItemsDialog.xaml.cs | 2 +- .../Filesystem/Cloud/CloudDrivesManager.cs | 2 +- src/Files.App/Filesystem/FileTagsManager.cs | 2 +- .../Filesystem/LibraryLocationItem.cs | 2 +- src/Files.App/Filesystem/LibraryManager.cs | 1 + .../Filesystem/QuickAccessManager.cs | 2 +- .../Filesystem/Search/FolderSearch.cs | 2 +- .../Filesystem/Security/AccessControlEntry.cs | 2 +- .../StorageFileExtensions.cs | 2 +- src/Files.App/Filesystem/WSLDistroManager.cs | 2 +- .../Filesystem/WindowsStorageDeviceWatcher.cs | 6 ++-- src/Files.App/GlobalUsings.cs | 8 +++-- src/Files.App/Helpers/DriveHelpers.cs | 22 ++++++------- .../Helpers/FilePropertiesHelpers.cs | 5 --- .../Helpers/ShellContextMenuHelper.cs | 2 +- src/Files.App/ISearchBox.cs | 1 + .../ServicesImplementation/ImagingService.cs | 4 --- .../ServicesImplementation/JumpListService.cs | 2 +- .../NetworkDrivesService.cs | 2 +- .../RemovableDrivesService.cs | 2 +- src/Files.App/Shell/RecycleBinManager.cs | 31 +++++++++---------- .../InnerNavigationToolbar.xaml.cs | 2 +- src/Files.App/UserControls/SearchBox.xaml | 4 +-- .../UserControls/SidebarControl.xaml | 10 +++--- .../UserControls/SidebarControl.xaml.cs | 5 ++- .../UserControls/Widgets/DrivesWidget.xaml.cs | 2 +- .../Widgets/QuickAccessWidget.xaml.cs | 2 +- .../ImageModelToImageConverter.cs | 1 - .../ReorderSidebarItemsDialogViewModel.cs | 4 +-- .../ViewModels/FolderSettingsViewModel.cs | 1 + src/Files.App/ViewModels/HomeViewModel.cs | 2 +- src/Files.App/ViewModels/MainPageViewModel.cs | 2 +- .../ViewModels/NetworkDrivesViewModel.cs | 2 +- .../Properties/BasePropertiesPage.cs | 4 +-- .../Properties/Items/DriveProperties.cs | 2 +- .../Properties/MainPropertiesViewModel.cs | 3 +- .../Properties/SecurityAdvancedViewModel.cs | 2 +- .../Properties/SecurityViewModel.cs | 2 +- .../ViewModels/SearchBoxViewModel.cs | 1 + src/Files.App/ViewModels/SidebarViewModel.cs | 2 +- src/Files.App/ViewModels/ToolbarViewModel.cs | 4 +-- .../Widgets/Bundles/BundlesViewModel.cs | 2 +- src/Files.App/Views/BaseShellPage.cs | 2 ++ .../Views/LayoutModes/ColumnViewBase.xaml.cs | 1 + .../LayoutModes/DetailsLayoutBrowser.xaml.cs | 1 + .../Views/LayoutModes/GridViewBrowser.xaml.cs | 1 + src/Files.App/Views/MainPage.xaml.cs | 3 +- src/Files.App/Views/ModernShellPage.xaml.cs | 2 +- .../Properties/CompatibilityPage.xaml.cs | 2 +- .../Properties/CustomizationPage.xaml.cs | 1 + .../Views/Properties/GeneralPage.xaml.cs | 2 +- .../Views/Properties/HashesPage.xaml.cs | 2 +- .../Views/Properties/MainPropertiesPage.xaml | 4 +-- .../Properties/MainPropertiesPage.xaml.cs | 2 +- .../Properties/SecurityAdvancedPage.xaml.cs | 4 +-- .../Views/Properties/SecurityPage.xaml.cs | 4 +-- 78 files changed, 126 insertions(+), 127 deletions(-) rename src/Files.App/{ => Data}/EventArguments/Bundles/BundlesOpenPathEventArgs.cs (93%) rename src/Files.App/{ => Data}/EventArguments/LayoutModeEventArgs.cs (90%) rename src/Files.App/{ => Data}/EventArguments/LayoutPreferenceEventArgs.cs (93%) rename src/Files.App/{DataModels => Data/Factories}/SecurityAdvancedAccessControlItemFactory.cs (99%) rename src/Files.App/{DataModels/NavigationControlItems => Data/Items}/DriveItem.cs (98%) rename src/Files.App/{DataModels/NavigationControlItems => Data/Items}/FileTagItem.cs (93%) rename src/Files.App/{DataModels/NavigationControlItems => Data/Items}/INavigationControlItem.cs (97%) rename src/Files.App/{DataModels/NavigationControlItems => Data/Items}/LocationItem.cs (97%) rename src/Files.App/{DataModels => Data/Items}/NavigationViewItemButtonStyleItem.cs (91%) rename src/Files.App/{DataModels => Data/Items}/PropertiesNavigationViewItemFactory.cs (93%) rename src/Files.App/{DataModels/NavigationControlItems => Data/Items}/WslDistroItem.cs (93%) rename src/Files.App/{DataModels => Data/Models}/AppModel.cs (98%) rename src/Files.App/{AppModels => Data/Models}/BitmapImageModel.cs (92%) rename src/Files.App/{DataModels => Data/Models}/SidebarPinnedModel.cs (98%) rename src/Files.App/{DataModels => Data/Models}/SuggestionModel.cs (98%) rename src/Files.App/{DataModels => Data/Parameters}/PropertiesPageNavigationParameter.cs (91%) diff --git a/src/Files.App/Actions/FileSystem/FormatDriveAction.cs b/src/Files.App/Actions/FileSystem/FormatDriveAction.cs index 6d3bfbee3aa0..30b2627150b0 100644 --- a/src/Files.App/Actions/FileSystem/FormatDriveAction.cs +++ b/src/Files.App/Actions/FileSystem/FormatDriveAction.cs @@ -4,7 +4,7 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.DependencyInjection; using Files.App.Contexts; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Extensions; using Files.App.Shell; using Files.App.ViewModels; diff --git a/src/Files.App/Actions/FileSystem/PasteItemAction.cs b/src/Files.App/Actions/FileSystem/PasteItemAction.cs index 09433b121b0a..b6d23dff182b 100644 --- a/src/Files.App/Actions/FileSystem/PasteItemAction.cs +++ b/src/Files.App/Actions/FileSystem/PasteItemAction.cs @@ -5,7 +5,7 @@ using CommunityToolkit.Mvvm.DependencyInjection; using Files.App.Commands; using Files.App.Contexts; -using Files.App.DataModels; +using Files.App.Data.Models; using Files.App.Extensions; using Files.App.Helpers; using System.ComponentModel; diff --git a/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs b/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs index 2085736a986c..4a106a9ec493 100644 --- a/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs +++ b/src/Files.App/Actions/FileSystem/PasteItemToSelectionAction.cs @@ -4,7 +4,7 @@ using CommunityToolkit.Mvvm.DependencyInjection; using Files.App.Commands; using Files.App.Contexts; -using Files.App.DataModels; +using Files.App.Data.Models; using Files.App.Extensions; using Files.App.Filesystem; using Files.App.Helpers; diff --git a/src/Files.App/App.xaml.cs b/src/Files.App/App.xaml.cs index 8452321890f0..09517e243c93 100644 --- a/src/Files.App/App.xaml.cs +++ b/src/Files.App/App.xaml.cs @@ -4,7 +4,7 @@ using CommunityToolkit.WinUI.Notifications; using Files.App.Commands; using Files.App.Contexts; -using Files.App.DataModels; +using Files.App.Data.Models; using Files.App.Extensions; using Files.App.Filesystem; using Files.App.Filesystem.Cloud; diff --git a/src/Files.App/BaseLayout.cs b/src/Files.App/BaseLayout.cs index 6a86212c86fd..63a74419a69a 100644 --- a/src/Files.App/BaseLayout.cs +++ b/src/Files.App/BaseLayout.cs @@ -28,6 +28,8 @@ using VA = Vanara.Windows.Shell; using DispatcherQueueTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer; using SortDirection = Files.Shared.Enums.SortDirection; +using Files.App.Data.EventArguments; +using Files.App.Data.Models; namespace Files.App { diff --git a/src/Files.App/EventArguments/Bundles/BundlesOpenPathEventArgs.cs b/src/Files.App/Data/EventArguments/Bundles/BundlesOpenPathEventArgs.cs similarity index 93% rename from src/Files.App/EventArguments/Bundles/BundlesOpenPathEventArgs.cs rename to src/Files.App/Data/EventArguments/Bundles/BundlesOpenPathEventArgs.cs index 0c9c3193a7f8..b9f3cf89f7c5 100644 --- a/src/Files.App/EventArguments/Bundles/BundlesOpenPathEventArgs.cs +++ b/src/Files.App/Data/EventArguments/Bundles/BundlesOpenPathEventArgs.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -namespace Files.App.EventArguments.Bundles +namespace Files.App.Data.EventArguments.Bundles { public class BundlesOpenPathEventArgs { diff --git a/src/Files.App/EventArguments/LayoutModeEventArgs.cs b/src/Files.App/Data/EventArguments/LayoutModeEventArgs.cs similarity index 90% rename from src/Files.App/EventArguments/LayoutModeEventArgs.cs rename to src/Files.App/Data/EventArguments/LayoutModeEventArgs.cs index 1ee16a8ba814..1c292057e618 100644 --- a/src/Files.App/EventArguments/LayoutModeEventArgs.cs +++ b/src/Files.App/Data/EventArguments/LayoutModeEventArgs.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -namespace Files.App.EventArguments +namespace Files.App.Data.EventArguments { public class LayoutModeEventArgs { diff --git a/src/Files.App/EventArguments/LayoutPreferenceEventArgs.cs b/src/Files.App/Data/EventArguments/LayoutPreferenceEventArgs.cs similarity index 93% rename from src/Files.App/EventArguments/LayoutPreferenceEventArgs.cs rename to src/Files.App/Data/EventArguments/LayoutPreferenceEventArgs.cs index 4d0256debf89..f971741b50ed 100644 --- a/src/Files.App/EventArguments/LayoutPreferenceEventArgs.cs +++ b/src/Files.App/Data/EventArguments/LayoutPreferenceEventArgs.cs @@ -3,7 +3,7 @@ using Files.App.Helpers.LayoutPreferences; -namespace Files.App.EventArguments +namespace Files.App.Data.EventArguments { public class LayoutPreferenceEventArgs { diff --git a/src/Files.App/DataModels/SecurityAdvancedAccessControlItemFactory.cs b/src/Files.App/Data/Factories/SecurityAdvancedAccessControlItemFactory.cs similarity index 99% rename from src/Files.App/DataModels/SecurityAdvancedAccessControlItemFactory.cs rename to src/Files.App/Data/Factories/SecurityAdvancedAccessControlItemFactory.cs index 8b6f9eb56ff9..dfb5a27401ad 100644 --- a/src/Files.App/DataModels/SecurityAdvancedAccessControlItemFactory.cs +++ b/src/Files.App/Data/Factories/SecurityAdvancedAccessControlItemFactory.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -namespace Files.App.DataModels +namespace Files.App.Data.Factories { public static class SecurityAdvancedAccessControlItemFactory { diff --git a/src/Files.App/DataModels/NavigationControlItems/DriveItem.cs b/src/Files.App/Data/Items/DriveItem.cs similarity index 98% rename from src/Files.App/DataModels/NavigationControlItems/DriveItem.cs rename to src/Files.App/Data/Items/DriveItem.cs index a3b6a9096d50..1a402efca8ae 100644 --- a/src/Files.App/DataModels/NavigationControlItems/DriveItem.cs +++ b/src/Files.App/Data/Items/DriveItem.cs @@ -12,7 +12,7 @@ using Windows.Storage; using Windows.Storage.Streams; -namespace Files.App.DataModels.NavigationControlItems +namespace Files.App.Data.Items { public class DriveItem : ObservableObject, INavigationControlItem, ILocatableFolder { @@ -212,7 +212,7 @@ public async Task UpdatePropertiesAsync() SpaceText = GetSizeString(); if (MaxSpace.Bytes > 0 && FreeSpace.Bytes > 0) // Make sure we don't divide by 0 - PercentageUsed = 100.0f - ((float)(FreeSpace.Bytes / MaxSpace.Bytes) * 100.0f); + PercentageUsed = 100.0f - (float)(FreeSpace.Bytes / MaxSpace.Bytes) * 100.0f; } else { diff --git a/src/Files.App/DataModels/NavigationControlItems/FileTagItem.cs b/src/Files.App/Data/Items/FileTagItem.cs similarity index 93% rename from src/Files.App/DataModels/NavigationControlItems/FileTagItem.cs rename to src/Files.App/Data/Items/FileTagItem.cs index 58438556847d..00a3878cb199 100644 --- a/src/Files.App/DataModels/NavigationControlItems/FileTagItem.cs +++ b/src/Files.App/Data/Items/FileTagItem.cs @@ -3,7 +3,7 @@ using Files.Backend.ViewModels.FileTags; -namespace Files.App.DataModels.NavigationControlItems +namespace Files.App.Data.Items { public class FileTagItem : INavigationControlItem { diff --git a/src/Files.App/DataModels/NavigationControlItems/INavigationControlItem.cs b/src/Files.App/Data/Items/INavigationControlItem.cs similarity index 97% rename from src/Files.App/DataModels/NavigationControlItems/INavigationControlItem.cs rename to src/Files.App/Data/Items/INavigationControlItem.cs index 7fe6ee7566b5..6535a5cc14c5 100644 --- a/src/Files.App/DataModels/NavigationControlItems/INavigationControlItem.cs +++ b/src/Files.App/Data/Items/INavigationControlItem.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -namespace Files.App.Filesystem +namespace Files.App.Data.Items { public interface INavigationControlItem : IComparable { diff --git a/src/Files.App/DataModels/NavigationControlItems/LocationItem.cs b/src/Files.App/Data/Items/LocationItem.cs similarity index 97% rename from src/Files.App/DataModels/NavigationControlItems/LocationItem.cs rename to src/Files.App/Data/Items/LocationItem.cs index 56a4bc1cd771..321058b9f0eb 100644 --- a/src/Files.App/DataModels/NavigationControlItems/LocationItem.cs +++ b/src/Files.App/Data/Items/LocationItem.cs @@ -6,7 +6,7 @@ using Microsoft.UI.Xaml.Media.Imaging; using System.IO; -namespace Files.App.DataModels.NavigationControlItems +namespace Files.App.Data.Items { public class LocationItem : ObservableObject, INavigationControlItem { diff --git a/src/Files.App/DataModels/NavigationViewItemButtonStyleItem.cs b/src/Files.App/Data/Items/NavigationViewItemButtonStyleItem.cs similarity index 91% rename from src/Files.App/DataModels/NavigationViewItemButtonStyleItem.cs rename to src/Files.App/Data/Items/NavigationViewItemButtonStyleItem.cs index 672eb0fb9992..59a3d13638b8 100644 --- a/src/Files.App/DataModels/NavigationViewItemButtonStyleItem.cs +++ b/src/Files.App/Data/Items/NavigationViewItemButtonStyleItem.cs @@ -1,11 +1,10 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using CommunityToolkit.Mvvm.ComponentModel; using Files.Backend.Enums; using Microsoft.UI.Xaml; -namespace Files.App.DataModels +namespace Files.App.Data.Items { public class NavigationViewItemButtonStyleItem : ObservableObject { diff --git a/src/Files.App/DataModels/PropertiesNavigationViewItemFactory.cs b/src/Files.App/Data/Items/PropertiesNavigationViewItemFactory.cs similarity index 93% rename from src/Files.App/DataModels/PropertiesNavigationViewItemFactory.cs rename to src/Files.App/Data/Items/PropertiesNavigationViewItemFactory.cs index 815288e68d97..a26155543858 100644 --- a/src/Files.App/DataModels/PropertiesNavigationViewItemFactory.cs +++ b/src/Files.App/Data/Items/PropertiesNavigationViewItemFactory.cs @@ -1,17 +1,11 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using System.Collections.ObjectModel; -using Files.App.DataModels.NavigationControlItems; -using Files.App.Extensions; -using Files.App.Filesystem; using Files.Backend.Enums; using Files.Backend.Helpers; using Microsoft.UI.Xaml; -using System.Collections.Generic; -using System.Linq; -namespace Files.App.DataModels +namespace Files.App.Data.Items { public static class PropertiesNavigationViewItemFactory { @@ -102,7 +96,7 @@ public static ObservableCollection Initialize var securityItemEnabled = !isLibrary && !listedItem.IsRecycleBinItem; var hashItemEnabled = !(isFolder && !listedItem.IsArchive) && !isLibrary && !listedItem.IsRecycleBinItem; var detailsItemEnabled = fileExt is not null && !isShortcut && !isLibrary; - var customizationItemEnabled = !isLibrary && ((isFolder && !listedItem.IsArchive) || (isShortcut && !listedItem.IsLinkItem)); + var customizationItemEnabled = !isLibrary && (isFolder && !listedItem.IsArchive || isShortcut && !listedItem.IsLinkItem); var compatibilityItemEnabled = FileExtensionHelpers.IsExecutableFile(listedItem is ShortcutItem sht ? sht.TargetPath : fileExt, true); if (!securityItemEnabled) diff --git a/src/Files.App/DataModels/NavigationControlItems/WslDistroItem.cs b/src/Files.App/Data/Items/WslDistroItem.cs similarity index 93% rename from src/Files.App/DataModels/NavigationControlItems/WslDistroItem.cs rename to src/Files.App/Data/Items/WslDistroItem.cs index 77801b26cc12..2be4fd90d89e 100644 --- a/src/Files.App/DataModels/NavigationControlItems/WslDistroItem.cs +++ b/src/Files.App/Data/Items/WslDistroItem.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -namespace Files.App.DataModels.NavigationControlItems +namespace Files.App.Data.Items { public class WslDistroItem : INavigationControlItem { diff --git a/src/Files.App/DataModels/AppModel.cs b/src/Files.App/Data/Models/AppModel.cs similarity index 98% rename from src/Files.App/DataModels/AppModel.cs rename to src/Files.App/Data/Models/AppModel.cs index 36759aa549f6..f7d68906a03e 100644 --- a/src/Files.App/DataModels/AppModel.cs +++ b/src/Files.App/Data/Models/AppModel.cs @@ -5,7 +5,7 @@ using Microsoft.UI.Xaml.Controls; using Windows.ApplicationModel.DataTransfer; -namespace Files.App.DataModels +namespace Files.App.Data.Models { public class AppModel : ObservableObject { diff --git a/src/Files.App/AppModels/BitmapImageModel.cs b/src/Files.App/Data/Models/BitmapImageModel.cs similarity index 92% rename from src/Files.App/AppModels/BitmapImageModel.cs rename to src/Files.App/Data/Models/BitmapImageModel.cs index ce1376515c60..36908b28614d 100644 --- a/src/Files.App/AppModels/BitmapImageModel.cs +++ b/src/Files.App/Data/Models/BitmapImageModel.cs @@ -4,7 +4,7 @@ using Files.Backend.Models; using Microsoft.UI.Xaml.Media.Imaging; -namespace Files.App.AppModels +namespace Files.App.Data.Models { /// internal sealed class BitmapImageModel : IImageModel diff --git a/src/Files.App/DataModels/SidebarPinnedModel.cs b/src/Files.App/Data/Models/SidebarPinnedModel.cs similarity index 98% rename from src/Files.App/DataModels/SidebarPinnedModel.cs rename to src/Files.App/Data/Models/SidebarPinnedModel.cs index 9d2a7811dbb4..c016a48e7a06 100644 --- a/src/Files.App/DataModels/SidebarPinnedModel.cs +++ b/src/Files.App/Data/Models/SidebarPinnedModel.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See the LICENSE. using CommunityToolkit.WinUI; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.ServicesImplementation; using Files.App.UserControls.Widgets; using System.Collections.Specialized; @@ -10,7 +10,7 @@ using System.Text.Json.Serialization; using Windows.Storage.FileProperties; -namespace Files.App.DataModels +namespace Files.App.Data.Models { public class SidebarPinnedModel { diff --git a/src/Files.App/DataModels/SuggestionModel.cs b/src/Files.App/Data/Models/SuggestionModel.cs similarity index 98% rename from src/Files.App/DataModels/SuggestionModel.cs rename to src/Files.App/Data/Models/SuggestionModel.cs index 89bb91b7e473..6747c448bb4e 100644 --- a/src/Files.App/DataModels/SuggestionModel.cs +++ b/src/Files.App/Data/Models/SuggestionModel.cs @@ -3,7 +3,7 @@ using Microsoft.UI.Xaml.Media.Imaging; -namespace Files.App.DataModels +namespace Files.App.Data.Models { public class SuggestionModel : ObservableObject { diff --git a/src/Files.App/DataModels/PropertiesPageNavigationParameter.cs b/src/Files.App/Data/Parameters/PropertiesPageNavigationParameter.cs similarity index 91% rename from src/Files.App/DataModels/PropertiesPageNavigationParameter.cs rename to src/Files.App/Data/Parameters/PropertiesPageNavigationParameter.cs index 6fccfe6969f6..1bebf59a2565 100644 --- a/src/Files.App/DataModels/PropertiesPageNavigationParameter.cs +++ b/src/Files.App/Data/Parameters/PropertiesPageNavigationParameter.cs @@ -5,7 +5,7 @@ using Microsoft.UI.Xaml; using System.Threading; -namespace Files.App.DataModels +namespace Files.App.Data.Parameters { public class PropertiesPageNavigationParameter { diff --git a/src/Files.App/Dialogs/ReorderSidebarItemsDialog.xaml b/src/Files.App/Dialogs/ReorderSidebarItemsDialog.xaml index e00a59e85409..8cd559201348 100644 --- a/src/Files.App/Dialogs/ReorderSidebarItemsDialog.xaml +++ b/src/Files.App/Dialogs/ReorderSidebarItemsDialog.xaml @@ -4,9 +4,9 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:dataitems="using:Files.App.Data.Items" xmlns:helpers="using:Files.App.Helpers" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:navigationcontrolitems="using:Files.App.DataModels.NavigationControlItems" Title="{helpers:ResourceString Name=ReorderSidebarItemsDialogText}" DefaultButton="Primary" IsPrimaryButtonEnabled="True" @@ -34,7 +34,7 @@ Grid.Row="1" ItemsSource="{x:Bind ViewModel.SidebarFavoriteItems, Mode=OneWay}"> - + CheckEmptyDrive(string? drivePath) var drivesViewModel = Ioc.Default.GetRequiredService(); var matchingDrive = drivesViewModel.Drives.Cast().FirstOrDefault(x => drivePath.StartsWith(x.Path, StringComparison.Ordinal)); - if (matchingDrive is null || matchingDrive.Type != DataModels.NavigationControlItems.DriveType.CDRom || matchingDrive.MaxSpace != ByteSizeLib.ByteSize.FromBytes(0)) + if (matchingDrive is null || matchingDrive.Type != Data.Items.DriveType.CDRom || matchingDrive.MaxSpace != ByteSizeLib.ByteSize.FromBytes(0)) return false; var ejectButton = await DialogDisplayHelper.ShowDialogAsync( @@ -114,25 +114,25 @@ public static async Task GetRootFromPathAsync(string devi return null; } - public static DataModels.NavigationControlItems.DriveType GetDriveType(System.IO.DriveInfo drive) + public static Data.Items.DriveType GetDriveType(System.IO.DriveInfo drive) { if (drive.DriveType is System.IO.DriveType.Unknown) { string path = PathNormalization.NormalizePath(drive.Name); if (path is "A:" or "B:") - return DataModels.NavigationControlItems.DriveType.FloppyDisk; + return Data.Items.DriveType.FloppyDisk; } return drive.DriveType switch { - System.IO.DriveType.CDRom => DataModels.NavigationControlItems.DriveType.CDRom, - System.IO.DriveType.Fixed => DataModels.NavigationControlItems.DriveType.Fixed, - System.IO.DriveType.Network => DataModels.NavigationControlItems.DriveType.Network, - System.IO.DriveType.NoRootDirectory => DataModels.NavigationControlItems.DriveType.NoRootDirectory, - System.IO.DriveType.Ram => DataModels.NavigationControlItems.DriveType.Ram, - System.IO.DriveType.Removable => DataModels.NavigationControlItems.DriveType.Removable, - _ => DataModels.NavigationControlItems.DriveType.Unknown, + System.IO.DriveType.CDRom => Data.Items.DriveType.CDRom, + System.IO.DriveType.Fixed => Data.Items.DriveType.Fixed, + System.IO.DriveType.Network => Data.Items.DriveType.Network, + System.IO.DriveType.NoRootDirectory => Data.Items.DriveType.NoRootDirectory, + System.IO.DriveType.Ram => Data.Items.DriveType.Ram, + System.IO.DriveType.Removable => Data.Items.DriveType.Removable, + _ => Data.Items.DriveType.Unknown, }; } diff --git a/src/Files.App/Helpers/FilePropertiesHelpers.cs b/src/Files.App/Helpers/FilePropertiesHelpers.cs index 00cc25ac294e..b1e8ac65bb44 100644 --- a/src/Files.App/Helpers/FilePropertiesHelpers.cs +++ b/src/Files.App/Helpers/FilePropertiesHelpers.cs @@ -1,17 +1,12 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using CommunityToolkit.Mvvm.DependencyInjection; -using Files.App.DataModels; -using Files.App.Extensions; -using Files.App.ViewModels; using Microsoft.UI; using Microsoft.UI.Windowing; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Media.Animation; using Microsoft.Windows.ApplicationModel.Resources; -using System; using System.IO; using Windows.ApplicationModel; using Windows.Graphics; diff --git a/src/Files.App/Helpers/ShellContextMenuHelper.cs b/src/Files.App/Helpers/ShellContextMenuHelper.cs index 0d76c4a911c0..dff3775a06af 100644 --- a/src/Files.App/Helpers/ShellContextMenuHelper.cs +++ b/src/Files.App/Helpers/ShellContextMenuHelper.cs @@ -4,8 +4,8 @@ using CommunityToolkit.Mvvm.DependencyInjection; using CommunityToolkit.Mvvm.Input; using CommunityToolkit.WinUI.UI; +using Files.App.Data.Items; using Files.App.Extensions; -using Files.App.Filesystem; using Files.App.Helpers.ContextFlyouts; using Files.App.Shell; using Files.App.ViewModels; diff --git a/src/Files.App/ISearchBox.cs b/src/Files.App/ISearchBox.cs index b2b65b0cdbcf..566823b3a37f 100644 --- a/src/Files.App/ISearchBox.cs +++ b/src/Files.App/ISearchBox.cs @@ -1,6 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. +using Files.App.Data.Models; using Microsoft.UI.Xaml.Controls; using Windows.Foundation; diff --git a/src/Files.App/ServicesImplementation/ImagingService.cs b/src/Files.App/ServicesImplementation/ImagingService.cs index 17d1e042ed60..5ab461635a0b 100644 --- a/src/Files.App/ServicesImplementation/ImagingService.cs +++ b/src/Files.App/ServicesImplementation/ImagingService.cs @@ -1,14 +1,10 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.AppModels; -using Files.App.Helpers; using Files.Backend.Models; using Files.Backend.Services; using Files.Sdk.Storage; using Files.Sdk.Storage.LocatableStorage; -using System.Threading; -using System.Threading.Tasks; using Windows.Storage.FileProperties; namespace Files.App.ServicesImplementation diff --git a/src/Files.App/ServicesImplementation/JumpListService.cs b/src/Files.App/ServicesImplementation/JumpListService.cs index 0cbbba3fcb64..3a4610dbace4 100644 --- a/src/Files.App/ServicesImplementation/JumpListService.cs +++ b/src/Files.App/ServicesImplementation/JumpListService.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See the LICENSE. using CommunityToolkit.Mvvm.DependencyInjection; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Extensions; using Files.App.Filesystem; using Files.App.Helpers; diff --git a/src/Files.App/ServicesImplementation/NetworkDrivesService.cs b/src/Files.App/ServicesImplementation/NetworkDrivesService.cs index e761403933f3..b886be28144d 100644 --- a/src/Files.App/ServicesImplementation/NetworkDrivesService.cs +++ b/src/Files.App/ServicesImplementation/NetworkDrivesService.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Shell; using Files.Backend.Services; using Files.Sdk.Storage.LocatableStorage; diff --git a/src/Files.App/ServicesImplementation/RemovableDrivesService.cs b/src/Files.App/ServicesImplementation/RemovableDrivesService.cs index ebf85484987e..49e7e73d119f 100644 --- a/src/Files.App/ServicesImplementation/RemovableDrivesService.cs +++ b/src/Files.App/ServicesImplementation/RemovableDrivesService.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See the LICENSE. using CommunityToolkit.WinUI; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Extensions; using Files.App.Filesystem; using Files.App.Helpers; diff --git a/src/Files.App/Shell/RecycleBinManager.cs b/src/Files.App/Shell/RecycleBinManager.cs index c0f9e04dd814..00dd05c17964 100644 --- a/src/Files.App/Shell/RecycleBinManager.cs +++ b/src/Files.App/Shell/RecycleBinManager.cs @@ -1,7 +1,6 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using System.IO; using System.Security.Principal; namespace Files.App.Shell @@ -9,12 +8,12 @@ namespace Files.App.Shell public sealed class RecycleBinManager { private static readonly Lazy lazy = new(() => new RecycleBinManager()); - private IList? binWatchers; + private IList? binWatchers; - public event FileSystemEventHandler? RecycleBinItemCreated; - public event FileSystemEventHandler? RecycleBinItemDeleted; - public event FileSystemEventHandler? RecycleBinItemRenamed; - public event FileSystemEventHandler? RecycleBinRefreshRequested; + public event SystemIO.FileSystemEventHandler? RecycleBinItemCreated; + public event SystemIO.FileSystemEventHandler? RecycleBinItemDeleted; + public event SystemIO.FileSystemEventHandler? RecycleBinItemRenamed; + public event SystemIO.FileSystemEventHandler? RecycleBinRefreshRequested; public static RecycleBinManager Default { @@ -36,21 +35,21 @@ private void StartRecycleBinWatcher() { // Create filesystem watcher to monitor recycle bin folder(s) // SHChangeNotifyRegister only works if recycle bin is open in explorer :( - binWatchers = new List(); + binWatchers = new List(); var sid = WindowsIdentity.GetCurrent().User.ToString(); - foreach (var drive in DriveInfo.GetDrives()) + foreach (var drive in SystemIO.DriveInfo.GetDrives()) { - var recyclePath = Path.Combine(drive.Name, "$RECYCLE.BIN", sid); + var recyclePath = SystemIO.Path.Combine(drive.Name, "$RECYCLE.BIN", sid); - if (drive.DriveType == DriveType.Network || !Directory.Exists(recyclePath)) + if (drive.DriveType == SystemIO.DriveType.Network || !SystemIO.Directory.Exists(recyclePath)) continue; - FileSystemWatcher watcher = new FileSystemWatcher + SystemIO.FileSystemWatcher watcher = new() { Path = recyclePath, Filter = "*.*", - NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName + NotifyFilter = SystemIO.NotifyFilters.LastWrite | SystemIO.NotifyFilters.FileName | SystemIO.NotifyFilters.DirectoryName }; watcher.Created += RecycleBinWatcher_Changed; @@ -61,7 +60,7 @@ private void StartRecycleBinWatcher() } } - private void RecycleBinWatcher_Changed(object sender, FileSystemEventArgs e) + private void RecycleBinWatcher_Changed(object sender, SystemIO.FileSystemEventArgs e) { System.Diagnostics.Debug.WriteLine($"Recycle bin event: {e.ChangeType}, {e.FullPath}"); if (e.Name.StartsWith("$I", StringComparison.Ordinal)) @@ -72,13 +71,13 @@ private void RecycleBinWatcher_Changed(object sender, FileSystemEventArgs e) switch (e.ChangeType) { - case WatcherChangeTypes.Created: + case SystemIO.WatcherChangeTypes.Created: RecycleBinItemCreated?.Invoke(this, e); break; - case WatcherChangeTypes.Deleted: + case SystemIO.WatcherChangeTypes.Deleted: RecycleBinItemDeleted?.Invoke(this, e); break; - case WatcherChangeTypes.Renamed: + case SystemIO.WatcherChangeTypes.Renamed: RecycleBinItemRenamed?.Invoke(this, e); break; default: diff --git a/src/Files.App/UserControls/InnerNavigationToolbar.xaml.cs b/src/Files.App/UserControls/InnerNavigationToolbar.xaml.cs index 4bfc3f054a23..84c5b5f3c9bb 100644 --- a/src/Files.App/UserControls/InnerNavigationToolbar.xaml.cs +++ b/src/Files.App/UserControls/InnerNavigationToolbar.xaml.cs @@ -3,7 +3,7 @@ using CommunityToolkit.Mvvm.DependencyInjection; using Files.App.Commands; -using Files.App.DataModels; +using Files.App.Data.Models; using Files.App.ViewModels; using Files.Backend.Services; using Files.Backend.Services.Settings; diff --git a/src/Files.App/UserControls/SearchBox.xaml b/src/Files.App/UserControls/SearchBox.xaml index 065d047b0a4d..575b5844f509 100644 --- a/src/Files.App/UserControls/SearchBox.xaml +++ b/src/Files.App/UserControls/SearchBox.xaml @@ -6,7 +6,7 @@ xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals" xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:dm="using:Files.App.DataModels" + xmlns:datamodels="using:Files.App.Data.Models" xmlns:helpers="using:Files.App.Helpers" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="300" @@ -42,7 +42,7 @@ - + - + - + - + - + SidebarFavoriteItems = new(App.QuickAccessManager.Model.favoriteList - .Where(x => x is LocationItem loc && loc.Section is Filesystem.SectionType.Favorites && !loc.IsHeader) + .Where(x => x is LocationItem loc && loc.Section is SectionType.Favorites && !loc.IsHeader) .Cast()); public ReorderSidebarItemsDialogViewModel() diff --git a/src/Files.App/ViewModels/FolderSettingsViewModel.cs b/src/Files.App/ViewModels/FolderSettingsViewModel.cs index 39f3b1e506a0..0de6cbba3d73 100644 --- a/src/Files.App/ViewModels/FolderSettingsViewModel.cs +++ b/src/Files.App/ViewModels/FolderSettingsViewModel.cs @@ -1,6 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. +using Files.App.Data.EventArguments; using Files.App.Helpers.LayoutPreferences; using Files.App.Views.LayoutModes; using System.Text.Json; diff --git a/src/Files.App/ViewModels/HomeViewModel.cs b/src/Files.App/ViewModels/HomeViewModel.cs index 798776984049..e2740ecc706b 100644 --- a/src/Files.App/ViewModels/HomeViewModel.cs +++ b/src/Files.App/ViewModels/HomeViewModel.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.EventArguments.Bundles; +using Files.App.Data.EventArguments.Bundles; using Files.App.ViewModels.Widgets; using Files.App.ViewModels.Widgets.Bundles; using Microsoft.UI.Xaml; diff --git a/src/Files.App/ViewModels/MainPageViewModel.cs b/src/Files.App/ViewModels/MainPageViewModel.cs index 970f5ccf72ce..5a06a8b21cf8 100644 --- a/src/Files.App/ViewModels/MainPageViewModel.cs +++ b/src/Files.App/ViewModels/MainPageViewModel.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Filesystem.StorageItems; using Files.App.UserControls.MultitaskingControl; using Files.App.Views; diff --git a/src/Files.App/ViewModels/NetworkDrivesViewModel.cs b/src/Files.App/ViewModels/NetworkDrivesViewModel.cs index 37a751ae3bf3..96d3b4d1be5f 100644 --- a/src/Files.App/ViewModels/NetworkDrivesViewModel.cs +++ b/src/Files.App/ViewModels/NetworkDrivesViewModel.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.Backend.Services; using Files.Sdk.Storage.LocatableStorage; diff --git a/src/Files.App/ViewModels/Properties/BasePropertiesPage.cs b/src/Files.App/ViewModels/Properties/BasePropertiesPage.cs index 6bea63db7b08..fa733d9a3e85 100644 --- a/src/Files.App/ViewModels/Properties/BasePropertiesPage.cs +++ b/src/Files.App/ViewModels/Properties/BasePropertiesPage.cs @@ -1,5 +1,5 @@ -using Files.App.DataModels; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; +using Files.App.Data.Parameters; using Files.App.Filesystem; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/Files.App/ViewModels/Properties/Items/DriveProperties.cs b/src/Files.App/ViewModels/Properties/Items/DriveProperties.cs index d21e637a6e41..4ad404bdf2d4 100644 --- a/src/Files.App/ViewModels/Properties/Items/DriveProperties.cs +++ b/src/Files.App/ViewModels/Properties/Items/DriveProperties.cs @@ -1,4 +1,4 @@ -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Extensions; using Files.App.Filesystem; using Files.App.Filesystem.StorageItems; diff --git a/src/Files.App/ViewModels/Properties/MainPropertiesViewModel.cs b/src/Files.App/ViewModels/Properties/MainPropertiesViewModel.cs index 6ad8dee6b929..e162f2297c4d 100644 --- a/src/Files.App/ViewModels/Properties/MainPropertiesViewModel.cs +++ b/src/Files.App/ViewModels/Properties/MainPropertiesViewModel.cs @@ -1,7 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.DependencyInjection; using CommunityToolkit.Mvvm.Input; -using Files.App.DataModels; using Files.App.Views.Properties; using Files.Backend.Enums; using Microsoft.UI.Windowing; @@ -13,6 +12,8 @@ using System.Linq; using System.Threading; using Microsoft.UI.Xaml.Media.Animation; +using Files.App.Data.Items; +using Files.App.Data.Parameters; namespace Files.App.ViewModels.Properties { diff --git a/src/Files.App/ViewModels/Properties/SecurityAdvancedViewModel.cs b/src/Files.App/ViewModels/Properties/SecurityAdvancedViewModel.cs index 0d89937d5232..f9fc0cba2859 100644 --- a/src/Files.App/ViewModels/Properties/SecurityAdvancedViewModel.cs +++ b/src/Files.App/ViewModels/Properties/SecurityAdvancedViewModel.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Extensions; using Files.App.Filesystem; using Files.App.Filesystem.Security; diff --git a/src/Files.App/ViewModels/Properties/SecurityViewModel.cs b/src/Files.App/ViewModels/Properties/SecurityViewModel.cs index 880ecf6e52aa..601b95e03e50 100644 --- a/src/Files.App/ViewModels/Properties/SecurityViewModel.cs +++ b/src/Files.App/ViewModels/Properties/SecurityViewModel.cs @@ -1,6 +1,6 @@ using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.Input; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Extensions; using Files.App.Filesystem; using Files.App.Filesystem.Security; diff --git a/src/Files.App/ViewModels/SearchBoxViewModel.cs b/src/Files.App/ViewModels/SearchBoxViewModel.cs index 1834e6f4ec12..cbdddd4382bc 100644 --- a/src/Files.App/ViewModels/SearchBoxViewModel.cs +++ b/src/Files.App/ViewModels/SearchBoxViewModel.cs @@ -1,6 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. +using Files.App.Data.Models; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Input; diff --git a/src/Files.App/ViewModels/SidebarViewModel.cs b/src/Files.App/ViewModels/SidebarViewModel.cs index 2e6484ae0172..43c68d62474a 100644 --- a/src/Files.App/ViewModels/SidebarViewModel.cs +++ b/src/Files.App/ViewModels/SidebarViewModel.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See the LICENSE. using CommunityToolkit.WinUI; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.UserControls; using Files.Shared.EventArguments; using Microsoft.UI.Dispatching; diff --git a/src/Files.App/ViewModels/ToolbarViewModel.cs b/src/Files.App/ViewModels/ToolbarViewModel.cs index f212812ae116..4121b5558841 100644 --- a/src/Files.App/ViewModels/ToolbarViewModel.cs +++ b/src/Files.App/ViewModels/ToolbarViewModel.cs @@ -5,7 +5,7 @@ using CommunityToolkit.WinUI.UI; using Files.App.Commands; using Files.App.Contexts; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Filesystem.StorageItems; using Files.App.Shell; using Files.App.UserControls; @@ -661,7 +661,7 @@ public async Task CheckPathInput(string currentInput, string currentSelectedPath if (resFolder || FolderHelpers.CheckFolderAccessWithWin32(currentInput)) { var matchingDrive = drivesViewModel.Drives.Cast().FirstOrDefault(x => PathNormalization.NormalizePath(currentInput).StartsWith(PathNormalization.NormalizePath(x.Path), StringComparison.Ordinal)); - if (matchingDrive is not null && matchingDrive.Type == DataModels.NavigationControlItems.DriveType.CDRom && matchingDrive.MaxSpace == ByteSizeLib.ByteSize.FromBytes(0)) + if (matchingDrive is not null && matchingDrive.Type == Data.Items.DriveType.CDRom && matchingDrive.MaxSpace == ByteSizeLib.ByteSize.FromBytes(0)) { bool ejectButton = await DialogDisplayHelper.ShowDialogAsync("InsertDiscDialog/Title".GetLocalizedResource(), string.Format("InsertDiscDialog/Text".GetLocalizedResource(), matchingDrive.Path), "InsertDiscDialog/OpenDriveButton".GetLocalizedResource(), "Close".GetLocalizedResource()); if (ejectButton) diff --git a/src/Files.App/ViewModels/Widgets/Bundles/BundlesViewModel.cs b/src/Files.App/ViewModels/Widgets/Bundles/BundlesViewModel.cs index 0499bfcd1eed..74ff334b2617 100644 --- a/src/Files.App/ViewModels/Widgets/Bundles/BundlesViewModel.cs +++ b/src/Files.App/ViewModels/Widgets/Bundles/BundlesViewModel.cs @@ -1,8 +1,8 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. +using Files.App.Data.EventArguments.Bundles; using Files.App.Dialogs; -using Files.App.EventArguments.Bundles; using Files.App.ViewModels.Dialogs; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/src/Files.App/Views/BaseShellPage.cs b/src/Files.App/Views/BaseShellPage.cs index a88d763a6253..41f4a9cc95e8 100644 --- a/src/Files.App/Views/BaseShellPage.cs +++ b/src/Files.App/Views/BaseShellPage.cs @@ -3,6 +3,8 @@ using CommunityToolkit.WinUI; using Files.App.Commands; +using Files.App.Data.EventArguments; +using Files.App.Data.Models; using Files.App.Filesystem.FilesystemHistory; using Files.App.Filesystem.Search; using Files.App.UserControls; diff --git a/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml.cs b/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml.cs index fcbaddaf4b81..35e287503e74 100644 --- a/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml.cs +++ b/src/Files.App/Views/LayoutModes/ColumnViewBase.xaml.cs @@ -17,6 +17,7 @@ using DispatcherQueueTimer = Microsoft.UI.Dispatching.DispatcherQueueTimer; using static Files.App.Constants; using Microsoft.UI.Dispatching; +using Files.App.Data.EventArguments; namespace Files.App.Views.LayoutModes { diff --git a/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs b/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs index 9db2c7309c56..155d2329bee3 100644 --- a/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs +++ b/src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs @@ -3,6 +3,7 @@ using CommunityToolkit.WinUI.UI; using Files.App.Commands; +using Files.App.Data.EventArguments; using Files.App.Helpers.XamlHelpers; using Files.App.UserControls; using Files.App.UserControls.Selection; diff --git a/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs b/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs index 419feae0551b..13d9ca20dbc2 100644 --- a/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs +++ b/src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs @@ -3,6 +3,7 @@ using CommunityToolkit.WinUI.UI; using Files.App.Commands; +using Files.App.Data.EventArguments; using Files.App.UserControls.Selection; using Microsoft.UI.Input; using Microsoft.UI.Xaml; diff --git a/src/Files.App/Views/MainPage.xaml.cs b/src/Files.App/Views/MainPage.xaml.cs index 0ecf5847427e..47a8821de0c3 100644 --- a/src/Files.App/Views/MainPage.xaml.cs +++ b/src/Files.App/Views/MainPage.xaml.cs @@ -6,7 +6,8 @@ using CommunityToolkit.WinUI.UI.Controls; using Files.App.Commands; using Files.App.Contexts; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; +using Files.App.Data.Models; using Files.App.UserControls; using Files.App.UserControls.MultitaskingControl; using Files.Backend.Extensions; diff --git a/src/Files.App/Views/ModernShellPage.xaml.cs b/src/Files.App/Views/ModernShellPage.xaml.cs index 2c76a101051e..107d879e5534 100644 --- a/src/Files.App/Views/ModernShellPage.xaml.cs +++ b/src/Files.App/Views/ModernShellPage.xaml.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.EventArguments; +using Files.App.Data.EventArguments; using Files.App.Extensions; using Files.App.Filesystem; using Files.App.Helpers; diff --git a/src/Files.App/Views/Properties/CompatibilityPage.xaml.cs b/src/Files.App/Views/Properties/CompatibilityPage.xaml.cs index c1f0a29413cc..e4f3502178cd 100644 --- a/src/Files.App/Views/Properties/CompatibilityPage.xaml.cs +++ b/src/Files.App/Views/Properties/CompatibilityPage.xaml.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.DataModels; +using Files.App.Data.Parameters; using Files.App.Filesystem; using Files.App.ViewModels.Properties; using Microsoft.UI.Xaml; diff --git a/src/Files.App/Views/Properties/CustomizationPage.xaml.cs b/src/Files.App/Views/Properties/CustomizationPage.xaml.cs index 192a26dafd3e..442a774a7f7a 100644 --- a/src/Files.App/Views/Properties/CustomizationPage.xaml.cs +++ b/src/Files.App/Views/Properties/CustomizationPage.xaml.cs @@ -1,6 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. +using Files.App.Data.Parameters; using Files.App.ViewModels.Properties; using Microsoft.UI.Xaml.Navigation; diff --git a/src/Files.App/Views/Properties/GeneralPage.xaml.cs b/src/Files.App/Views/Properties/GeneralPage.xaml.cs index 466db437b0eb..904673198ccd 100644 --- a/src/Files.App/Views/Properties/GeneralPage.xaml.cs +++ b/src/Files.App/Views/Properties/GeneralPage.xaml.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. See the LICENSE. using CommunityToolkit.WinUI; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; using Files.App.Extensions; using Files.App.Filesystem; using Files.App.Helpers; diff --git a/src/Files.App/Views/Properties/HashesPage.xaml.cs b/src/Files.App/Views/Properties/HashesPage.xaml.cs index b110dbeae548..adf28b45c0bc 100644 --- a/src/Files.App/Views/Properties/HashesPage.xaml.cs +++ b/src/Files.App/Views/Properties/HashesPage.xaml.cs @@ -1,7 +1,7 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.DataModels; +using Files.App.Data.Parameters; using Files.App.Filesystem; using Files.App.ViewModels.Properties; using Microsoft.UI.Xaml; diff --git a/src/Files.App/Views/Properties/MainPropertiesPage.xaml b/src/Files.App/Views/Properties/MainPropertiesPage.xaml index f9e30282592b..f868e7f7c963 100644 --- a/src/Files.App/Views/Properties/MainPropertiesPage.xaml +++ b/src/Files.App/Views/Properties/MainPropertiesPage.xaml @@ -5,7 +5,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:datamodels="using:Files.App.DataModels" + xmlns:dataitems="using:Files.App.Data.Items" xmlns:helpers="using:Files.App.Helpers" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:uc="using:Files.App.UserControls" @@ -111,7 +111,7 @@ - + diff --git a/src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs b/src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs index c06cba6a3e49..f59fdc1b93aa 100644 --- a/src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs +++ b/src/Files.App/Views/Properties/MainPropertiesPage.xaml.cs @@ -3,7 +3,7 @@ using CommunityToolkit.Mvvm.DependencyInjection; using CommunityToolkit.WinUI; -using Files.App.DataModels; +using Files.App.Data.Parameters; using Files.App.Helpers; using Files.App.ViewModels; using Files.App.ViewModels.Properties; diff --git a/src/Files.App/Views/Properties/SecurityAdvancedPage.xaml.cs b/src/Files.App/Views/Properties/SecurityAdvancedPage.xaml.cs index 12609444177c..db3d57f9d180 100644 --- a/src/Files.App/Views/Properties/SecurityAdvancedPage.xaml.cs +++ b/src/Files.App/Views/Properties/SecurityAdvancedPage.xaml.cs @@ -1,8 +1,8 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.DataModels; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; +using Files.App.Data.Parameters; using Files.App.Filesystem; using Files.App.ViewModels.Properties; using Microsoft.UI.Xaml.Navigation; diff --git a/src/Files.App/Views/Properties/SecurityPage.xaml.cs b/src/Files.App/Views/Properties/SecurityPage.xaml.cs index 2e45855c6b25..bf4804892bf6 100644 --- a/src/Files.App/Views/Properties/SecurityPage.xaml.cs +++ b/src/Files.App/Views/Properties/SecurityPage.xaml.cs @@ -1,8 +1,8 @@ // Copyright (c) 2023 Files Community // Licensed under the MIT License. See the LICENSE. -using Files.App.DataModels; -using Files.App.DataModels.NavigationControlItems; +using Files.App.Data.Items; +using Files.App.Data.Parameters; using Files.App.Filesystem; using Files.App.ViewModels.Properties; using Microsoft.UI.Xaml;