From 5ef16ae99a31b1b30a6f8f7d6d502ce305fb5e83 Mon Sep 17 00:00:00 2001 From: Violet Hansen Date: Mon, 13 Jan 2025 21:32:36 +0200 Subject: [PATCH] Aligned folder structure with namespaces (#523) This PR aligns namespaces with folder structures. Removes 2 unused methods. Applies minor code modernizations. --- AppControl Manager/.editorconfig | 6 ++ AppControl Manager/App.xaml.cs | 5 +- .../{AppSettings.cs => AppSettingsCls.cs} | 4 +- .../AppSettings/AppThemeManager.cs | 2 +- .../AppSettings/IconsStyleManager.cs | 2 +- .../NavigationBackgroundManager.cs | 2 +- .../NavigationViewLocationManager.cs | 2 +- .../AppSettings/SoundManager.cs | 2 +- .../AppSettings/ThemeManager.cs | 2 +- .../SigningDetailsDialog.xaml.cs | 4 +- .../SigningDetailsDialogForRemoval.xaml.cs | 4 +- .../{Logic => }/IntelGathering/CILogIntel.cs | 0 .../IntelGathering/CertCNFetcher.cs | 3 +- .../IntelGathering/DriveLetterMapper.cs | 0 .../{Logic => }/IntelGathering/EventAction.cs | 0 .../IntelGathering/FileIdentity.cs | 0 .../IntelGathering/FileIdentityComparer.cs | 0 .../FileIdentityECCBasedHashSet.cs | 2 +- .../IntelGathering/FileIdentityOrigin.cs | 0 .../FileIdentitySignatureBasedHashSet.cs | 2 +- .../FileIdentityTimeBasedHashSet.cs | 2 +- .../IntelGathering/FileSignerInfo.cs | 0 .../IntelGathering/FileSignerInfoComparer.cs | 0 .../IntelGathering/GetEventLogsData.cs | 2 +- .../GetMDEAdvancedHuntingLogsData.cs | 0 .../InferCertificatePresence.cs | 4 +- .../IntelGathering/KernelModeDrivers.cs | 2 +- .../IntelGathering/KernelUserVerdict.cs | 0 .../IntelGathering/LocalFilesScan.cs | 4 +- .../IntelGathering/MDEAdvancedHuntingData.cs | 0 .../IntelGathering/OptimizeMDECSVData.cs | 0 .../IntelGathering/PlatformInvocations.cs | 0 .../IntelGathering/PrepareEmptyPolicy.cs | 2 +- .../{Logic => }/IntelGathering/ScanLevels.cs | 0 .../IntelGathering/SignatureStatus.cs | 0 .../FileAttribComparer .cs | 82 ------------------- .../Types And Definitions/FileAttribX.cs | 19 ----- .../{Logic => }/Main/AppControlSimulation.cs | 15 ++-- .../{Logic => }/Main/BasePolicyCreator.cs | 5 +- .../{Logic => }/Main/GetCIPolicySetting.cs | 3 +- .../{Logic => }/Main/GetCiFileHashes.cs | 17 ++-- .../{Logic => }/Main/SetCiRuleOptions.cs | 6 +- .../{Logic => }/Main/TestCiPolicy.cs | 3 +- .../{Logic => }/Main/UserConfiguration.cs | 10 +-- AppControl Manager/MainWindow.xaml.cs | 42 +++++----- .../AllCertificatesGrabber.cs | 2 +- .../{Logic => Others}/AppUpdate.cs | 3 +- .../AuthenticodePageHashes.cs | 3 +- .../{Logic => Others}/CertificateCreator.cs | 4 +- .../CertificateDetailsCreator.cs | 5 +- .../{Logic => Others}/CertificateHelper.cs | 2 +- .../CertificateSignerCreator.cs | 3 +- .../ChainElement.cs | 2 +- .../ChainPackage.cs | 2 +- .../CheckPolicyDeploymentStatus.cs | 2 +- .../{Logic => Others}/CiToolHelper.cs | 3 +- .../{Logic => Others}/CodeIntegrityInfo.cs | 0 .../CodeIntegrityPolicy.cs | 2 +- .../{Logic => Others}/ConfigureISGServices.cs | 4 +- .../{Logic => Others}/Crypt32CertCN.cs | 2 +- .../{Logic => Others}/DeviceGuardInfo.cs | 2 +- .../{Logic => Others}/EventLogUtility.cs | 3 +- .../FileBasedInfoPackage.cs | 2 +- .../FileCertificateInfoCol.cs | 2 +- .../{Logic => Others}/FileDialogHelper.cs | 2 +- .../FilePublisherSignerCreator.cs | 2 +- .../GetExtendedFileAttrib.cs | 2 +- .../{Logic => Others}/GetFilesFast.cs | 3 +- .../{Logic => Others}/GetOpusData.cs | 2 +- .../{Logic => Others}/GlobalVars.cs | 2 +- .../HashCreator.cs | 5 +- .../{Logging => Others}/Logger.cs | 2 +- .../{Logic => Others}/MainWindowViewModel.cs | 2 +- .../{Logic => Others}/MeowOpener.cs | 3 +- .../MoveUserModeToKernelMode.cs | 3 +- .../OpusSigner.cs | 2 +- .../{Logic => Others}/PageHashCalc.cs | 2 +- .../PolicyFileSigningStatusDetection.cs | 3 +- .../PolicyHashObj.cs | 2 +- .../{Logic => Others}/PolicyToCIPConverter.cs | 4 +- .../{Logic => Others}/ProcessStarter.cs | 2 +- .../PublisherSignerCreator.cs | 2 +- .../RemoveSupplementalSigners.cs | 4 +- .../{Logic => Others}/SecHttpClient.cs | 2 +- .../{Logic => Others}/SignToolHelper.cs | 4 +- .../SignerX.cs | 3 +- .../SimulationInput.cs | 2 +- .../SimulationOutput.cs | 3 +- .../{Logic => Others}/SnapBackGuarantee.cs | 3 +- .../{Logic => Others}/StagingArea.cs | 2 +- .../{Logic => Others}/SupplementalForSelf.cs | 4 +- .../{Logic => Others}/TaskSchedulerHelper.cs | 3 +- .../UpdateCheckResponse.cs | 2 +- .../{Logic => Others}/Win32Interop.cs | 2 +- .../WinTrust.cs | 0 .../WldpQuerySecurityPolicy.cs | 4 +- .../{Logic => Others}/XmlFilePathExtractor.cs | 2 +- .../{Logic => Others}/packageManagement.cs | 14 +--- .../AllowNewApps/AllowNewAppsStart.xaml.cs | 4 +- .../Pages/BuildNewCertificate.xaml.cs | 2 +- .../Pages/ConfigurePolicyRuleOptions.xaml.cs | 3 +- .../Pages/CreateDenyPolicy.xaml.cs | 3 +- AppControl Manager/Pages/CreatePolicy.xaml.cs | 2 + .../Pages/CreateSupplementalPolicy.xaml.cs | 3 +- AppControl Manager/Pages/Deployment.xaml.cs | 3 +- .../Pages/EventLogsPolicyCreation.xaml.cs | 3 +- AppControl Manager/Pages/GetCIHashes.xaml.cs | 2 + .../Pages/GetSecurePolicySettings.xaml.cs | 1 + AppControl Manager/Pages/Logs.xaml.cs | 2 +- .../Pages/MDEAHPolicyCreation.xaml.cs | 3 +- .../Pages/MergePolicies.xaml.cs | 1 + AppControl Manager/Pages/Settings.xaml.cs | 8 +- AppControl Manager/Pages/Simulation.xaml.cs | 2 + .../CodeIntegrityInfo.xaml.cs | 1 + .../ViewCurrentPolicies.xaml.cs | 4 +- AppControl Manager/Pages/Update.xaml.cs | 11 +-- .../Pages/UpdatePageCustomMSIXPath.xaml.cs | 1 + .../Pages/ValidatePolicy.xaml.cs | 2 + .../Pages/ViewFileCertificates.xaml.cs | 2 + AppControl Manager/SiPolicy/Management.cs | 1 + .../SiPolicy/Merger.Aggregate.cs | 2 +- .../SiPolicyIntel/AddSigningDetails.cs | 1 + .../Arbitrator.cs | 4 +- .../GetCertificateDetails.cs | 3 +- .../GetFileRuleOutput.cs | 4 +- .../GetSignerInfo.cs | 3 +- .../XMLOps/ClearCiPolicySemantic.cs | 1 + AppControl Manager/XMLOps/EditGUIDs.cs | 1 + AppControl Manager/XMLOps/Macros.cs | 2 +- AppControl Manager/XMLOps/Master.cs | 2 +- .../XMLOps/NewCertificateSignerRules.cs | 1 + .../XMLOps/NewFilePublisherLevelRules.cs | 2 +- .../XMLOps/NewHashLevelRules.cs | 2 +- AppControl Manager/XMLOps/NewPFNLevelRules.cs | 1 + .../XMLOps/NewPublisherLevelRules.cs | 2 +- AppControl Manager/XMLOps/SetCiPolicyInfo.cs | 3 +- .../XMLOps/SignerAndHashBuilder.cs | 2 +- .../XMLOps/UpdateHvciOptions.cs | 3 +- 138 files changed, 218 insertions(+), 292 deletions(-) rename AppControl Manager/AppSettings/{AppSettings.cs => AppSettingsCls.cs} (97%) rename AppControl Manager/{Logic => }/IntelGathering/CILogIntel.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/CertCNFetcher.cs (94%) rename AppControl Manager/{Logic => }/IntelGathering/DriveLetterMapper.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/EventAction.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/FileIdentity.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/FileIdentityComparer.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/FileIdentityECCBasedHashSet.cs (98%) rename AppControl Manager/{Logic => }/IntelGathering/FileIdentityOrigin.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/FileIdentitySignatureBasedHashSet.cs (99%) rename AppControl Manager/{Logic => }/IntelGathering/FileIdentityTimeBasedHashSet.cs (99%) rename AppControl Manager/{Logic => }/IntelGathering/FileSignerInfo.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/FileSignerInfoComparer.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/GetEventLogsData.cs (99%) rename AppControl Manager/{Logic => }/IntelGathering/GetMDEAdvancedHuntingLogsData.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/InferCertificatePresence.cs (98%) rename AppControl Manager/{Logic => }/IntelGathering/KernelModeDrivers.cs (99%) rename AppControl Manager/{Logic => }/IntelGathering/KernelUserVerdict.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/LocalFilesScan.cs (99%) rename AppControl Manager/{Logic => }/IntelGathering/MDEAdvancedHuntingData.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/OptimizeMDECSVData.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/PlatformInvocations.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/PrepareEmptyPolicy.cs (96%) rename AppControl Manager/{Logic => }/IntelGathering/ScanLevels.cs (100%) rename AppControl Manager/{Logic => }/IntelGathering/SignatureStatus.cs (100%) delete mode 100644 AppControl Manager/Logic/Types And Definitions/FileAttribComparer .cs delete mode 100644 AppControl Manager/Logic/Types And Definitions/FileAttribX.cs rename AppControl Manager/{Logic => }/Main/AppControlSimulation.cs (97%) rename AppControl Manager/{Logic => }/Main/BasePolicyCreator.cs (99%) rename AppControl Manager/{Logic => }/Main/GetCIPolicySetting.cs (97%) rename AppControl Manager/{Logic => }/Main/GetCiFileHashes.cs (85%) rename AppControl Manager/{Logic => }/Main/SetCiRuleOptions.cs (98%) rename AppControl Manager/{Logic => }/Main/TestCiPolicy.cs (96%) rename AppControl Manager/{Logic => }/Main/UserConfiguration.cs (98%) rename AppControl Manager/{Logic => Others}/AllCertificatesGrabber.cs (99%) rename AppControl Manager/{Logic => Others}/AppUpdate.cs (97%) rename AppControl Manager/{Logic/Types And Definitions => Others}/AuthenticodePageHashes.cs (91%) rename AppControl Manager/{Logic => Others}/CertificateCreator.cs (99%) rename AppControl Manager/{Logic/Types And Definitions => Others}/CertificateDetailsCreator.cs (91%) rename AppControl Manager/{Logic => Others}/CertificateHelper.cs (99%) rename AppControl Manager/{Logic/Types And Definitions => Others}/CertificateSignerCreator.cs (87%) rename AppControl Manager/{Logic/Types And Definitions => Others}/ChainElement.cs (95%) rename AppControl Manager/{Logic/Types And Definitions => Others}/ChainPackage.cs (94%) rename AppControl Manager/{Logic => Others}/CheckPolicyDeploymentStatus.cs (97%) rename AppControl Manager/{Logic => Others}/CiToolHelper.cs (99%) rename AppControl Manager/{Logic => Others}/CodeIntegrityInfo.cs (100%) rename AppControl Manager/{Logic/Types And Definitions => Others}/CodeIntegrityPolicy.cs (99%) rename AppControl Manager/{Logic => Others}/ConfigureISGServices.cs (93%) rename AppControl Manager/{Logic => Others}/Crypt32CertCN.cs (98%) rename AppControl Manager/{Logic => Others}/DeviceGuardInfo.cs (98%) rename AppControl Manager/{Logic => Others}/EventLogUtility.cs (97%) rename AppControl Manager/{Logic/Types And Definitions => Others}/FileBasedInfoPackage.cs (94%) rename AppControl Manager/{Logic => Others}/FileCertificateInfoCol.cs (94%) rename AppControl Manager/{Logic => Others}/FileDialogHelper.cs (99%) rename AppControl Manager/{Logic/Types And Definitions => Others}/FilePublisherSignerCreator.cs (97%) rename AppControl Manager/{Logic => Others}/GetExtendedFileAttrib.cs (99%) rename AppControl Manager/{Logic => Others}/GetFilesFast.cs (99%) rename AppControl Manager/{Logic => Others}/GetOpusData.cs (99%) rename AppControl Manager/{Logic => Others}/GlobalVars.cs (99%) rename AppControl Manager/{Logic/Types And Definitions => Others}/HashCreator.cs (90%) rename AppControl Manager/{Logging => Others}/Logger.cs (98%) rename AppControl Manager/{Logic => Others}/MainWindowViewModel.cs (98%) rename AppControl Manager/{Logic => Others}/MeowOpener.cs (98%) rename AppControl Manager/{Logic => Others}/MoveUserModeToKernelMode.cs (98%) rename AppControl Manager/{Logic/Types And Definitions => Others}/OpusSigner.cs (82%) rename AppControl Manager/{Logic => Others}/PageHashCalc.cs (98%) rename AppControl Manager/{Logic => Others}/PolicyFileSigningStatusDetection.cs (96%) rename AppControl Manager/{Logic/Types And Definitions => Others}/PolicyHashObj.cs (96%) rename AppControl Manager/{Logic => Others}/PolicyToCIPConverter.cs (93%) rename AppControl Manager/{Logic => Others}/ProcessStarter.cs (97%) rename AppControl Manager/{Logic/Types And Definitions => Others}/PublisherSignerCreator.cs (96%) rename AppControl Manager/{Logic => Others}/RemoveSupplementalSigners.cs (98%) rename AppControl Manager/{Logic => Others}/SecHttpClient.cs (92%) rename AppControl Manager/{Logic => Others}/SignToolHelper.cs (99%) rename AppControl Manager/{Logic/Types And Definitions => Others}/SignerX.cs (91%) rename AppControl Manager/{Logic/Types And Definitions => Others}/SimulationInput.cs (93%) rename AppControl Manager/{Logic/Types And Definitions => Others}/SimulationOutput.cs (98%) rename AppControl Manager/{Logic => Others}/SnapBackGuarantee.cs (99%) rename AppControl Manager/{Logic => Others}/StagingArea.cs (96%) rename AppControl Manager/{Logic => Others}/SupplementalForSelf.cs (99%) rename AppControl Manager/{Logic => Others}/TaskSchedulerHelper.cs (97%) rename AppControl Manager/{Logic/Types And Definitions => Others}/UpdateCheckResponse.cs (91%) rename AppControl Manager/{Logic => Others}/Win32Interop.cs (97%) rename AppControl Manager/{Logic/Types And Definitions => Others}/WinTrust.cs (100%) rename AppControl Manager/{Logic => Others}/WldpQuerySecurityPolicy.cs (96%) rename AppControl Manager/{Logic => Others}/XmlFilePathExtractor.cs (96%) rename AppControl Manager/{Logic => Others}/packageManagement.cs (87%) rename AppControl Manager/{Logic/App Control Simulation => SimulationMethods}/Arbitrator.cs (99%) rename AppControl Manager/{Logic/App Control Simulation => SimulationMethods}/GetCertificateDetails.cs (99%) rename AppControl Manager/{Logic/App Control Simulation => SimulationMethods}/GetFileRuleOutput.cs (97%) rename AppControl Manager/{Logic/App Control Simulation => SimulationMethods}/GetSignerInfo.cs (99%) diff --git a/AppControl Manager/.editorconfig b/AppControl Manager/.editorconfig index a895d2e88..b849cdedb 100644 --- a/AppControl Manager/.editorconfig +++ b/AppControl Manager/.editorconfig @@ -1096,3 +1096,9 @@ dotnet_diagnostic.CA1002.severity = error # CA1034: Nested types should not be visible dotnet_diagnostic.CA1034.severity = error + +# IDE0130: Namespace does not match folder structure +dotnet_diagnostic.IDE0130.severity = error + +# IDE0320: Make anonymous function static +dotnet_diagnostic.IDE0320.severity = error diff --git a/AppControl Manager/App.xaml.cs b/AppControl Manager/App.xaml.cs index 9be248c3a..7366d6f2b 100644 --- a/AppControl Manager/App.xaml.cs +++ b/AppControl Manager/App.xaml.cs @@ -2,7 +2,8 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -using AppControlManager.Logging; +using AppControlManager.AppSettings; +using AppControlManager.Others; using CommunityToolkit.WinUI; using Microsoft.UI; using Microsoft.UI.Xaml; @@ -57,7 +58,7 @@ public App() #region // Check for the SoundSetting in the local settings - bool soundSetting = AppSettings.GetSetting(AppSettings.SettingKeys.SoundSetting); + bool soundSetting = AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.SoundSetting); if (soundSetting) { diff --git a/AppControl Manager/AppSettings/AppSettings.cs b/AppControl Manager/AppSettings/AppSettingsCls.cs similarity index 97% rename from AppControl Manager/AppSettings/AppSettings.cs rename to AppControl Manager/AppSettings/AppSettingsCls.cs index 61dd3ad21..d2e5d7d4d 100644 --- a/AppControl Manager/AppSettings/AppSettings.cs +++ b/AppControl Manager/AppSettings/AppSettingsCls.cs @@ -1,10 +1,10 @@ using Windows.Storage; -namespace AppControlManager; +namespace AppControlManager.AppSettings; // https://learn.microsoft.com/en-us/uwp/api/windows.storage.applicationdata.localsettings -internal static class AppSettings +internal static class AppSettingsCls { /// /// Save setting to local storage with a specific key and value diff --git a/AppControl Manager/AppSettings/AppThemeManager.cs b/AppControl Manager/AppSettings/AppThemeManager.cs index c04da5d92..4b124c04f 100644 --- a/AppControl Manager/AppSettings/AppThemeManager.cs +++ b/AppControl Manager/AppSettings/AppThemeManager.cs @@ -1,6 +1,6 @@ using System; -namespace AppControlManager; +namespace AppControlManager.AppSettings; // Custom EventArgs class for app theme changes internal sealed class AppThemeChangedEventArgs(string? newTheme) : EventArgs diff --git a/AppControl Manager/AppSettings/IconsStyleManager.cs b/AppControl Manager/AppSettings/IconsStyleManager.cs index 922c7065c..3f05f33e7 100644 --- a/AppControl Manager/AppSettings/IconsStyleManager.cs +++ b/AppControl Manager/AppSettings/IconsStyleManager.cs @@ -1,6 +1,6 @@ using System; -namespace AppControlManager; +namespace AppControlManager.AppSettings; // Custom EventArgs class for Icons Style changes internal sealed class IconsStyleChangedEventArgs(string? newIconsStyle) : EventArgs diff --git a/AppControl Manager/AppSettings/NavigationBackgroundManager.cs b/AppControl Manager/AppSettings/NavigationBackgroundManager.cs index 03562fc95..44897e3cd 100644 --- a/AppControl Manager/AppSettings/NavigationBackgroundManager.cs +++ b/AppControl Manager/AppSettings/NavigationBackgroundManager.cs @@ -1,6 +1,6 @@ using System; -namespace AppControlManager; +namespace AppControlManager.AppSettings; // Custom EventArgs class for navigation background changes internal sealed class NavigationBackgroundChangedEventArgs(bool isBackgroundOn) : EventArgs diff --git a/AppControl Manager/AppSettings/NavigationViewLocationManager.cs b/AppControl Manager/AppSettings/NavigationViewLocationManager.cs index a88b4b92b..3e76d3d43 100644 --- a/AppControl Manager/AppSettings/NavigationViewLocationManager.cs +++ b/AppControl Manager/AppSettings/NavigationViewLocationManager.cs @@ -1,6 +1,6 @@ using System; -namespace AppControlManager; +namespace AppControlManager.AppSettings; // Custom EventArgs class for navigation view location changes internal sealed class NavigationViewLocationChangedEventArgs(string newLocation) : EventArgs diff --git a/AppControl Manager/AppSettings/SoundManager.cs b/AppControl Manager/AppSettings/SoundManager.cs index c2e5fed26..cc581666e 100644 --- a/AppControl Manager/AppSettings/SoundManager.cs +++ b/AppControl Manager/AppSettings/SoundManager.cs @@ -1,6 +1,6 @@ using System; -namespace AppControlManager; +namespace AppControlManager.AppSettings; // Custom EventArgs class for sound setting changes internal sealed class SoundSettingChangedEventArgs(bool isSoundOn) : EventArgs diff --git a/AppControl Manager/AppSettings/ThemeManager.cs b/AppControl Manager/AppSettings/ThemeManager.cs index 750a8d540..fa67d4697 100644 --- a/AppControl Manager/AppSettings/ThemeManager.cs +++ b/AppControl Manager/AppSettings/ThemeManager.cs @@ -1,6 +1,6 @@ using System; -namespace AppControlManager; +namespace AppControlManager.AppSettings; // Custom EventArgs class for the event internal sealed class BackgroundChangedEventArgs(string? newBackground) : EventArgs diff --git a/AppControl Manager/CustomUIElements/SigningDetailsDialog.xaml.cs b/AppControl Manager/CustomUIElements/SigningDetailsDialog.xaml.cs index dddd714c8..8ad2e11a1 100644 --- a/AppControl Manager/CustomUIElements/SigningDetailsDialog.xaml.cs +++ b/AppControl Manager/CustomUIElements/SigningDetailsDialog.xaml.cs @@ -3,7 +3,9 @@ using System.IO; using System.Linq; using System.Threading.Tasks; -using AppControlManager.Logic.IntelGathering; +using AppControlManager.IntelGathering; +using AppControlManager.Main; +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Input; diff --git a/AppControl Manager/CustomUIElements/SigningDetailsDialogForRemoval.xaml.cs b/AppControl Manager/CustomUIElements/SigningDetailsDialogForRemoval.xaml.cs index aa3e52853..508c3adaf 100644 --- a/AppControl Manager/CustomUIElements/SigningDetailsDialogForRemoval.xaml.cs +++ b/AppControl Manager/CustomUIElements/SigningDetailsDialogForRemoval.xaml.cs @@ -3,7 +3,9 @@ using System.IO; using System.Linq; using System.Threading.Tasks; -using AppControlManager.Logic.IntelGathering; +using AppControlManager.IntelGathering; +using AppControlManager.Main; +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Input; diff --git a/AppControl Manager/Logic/IntelGathering/CILogIntel.cs b/AppControl Manager/IntelGathering/CILogIntel.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/CILogIntel.cs rename to AppControl Manager/IntelGathering/CILogIntel.cs diff --git a/AppControl Manager/Logic/IntelGathering/CertCNFetcher.cs b/AppControl Manager/IntelGathering/CertCNFetcher.cs similarity index 94% rename from AppControl Manager/Logic/IntelGathering/CertCNFetcher.cs rename to AppControl Manager/IntelGathering/CertCNFetcher.cs index 316cb9eff..dac9ca6e1 100644 --- a/AppControl Manager/Logic/IntelGathering/CertCNFetcher.cs +++ b/AppControl Manager/IntelGathering/CertCNFetcher.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Security.Cryptography.X509Certificates; +using AppControlManager.Others; -namespace AppControlManager; +namespace AppControlManager.IntelGathering; internal static class CertCNFetcher { diff --git a/AppControl Manager/Logic/IntelGathering/DriveLetterMapper.cs b/AppControl Manager/IntelGathering/DriveLetterMapper.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/DriveLetterMapper.cs rename to AppControl Manager/IntelGathering/DriveLetterMapper.cs diff --git a/AppControl Manager/Logic/IntelGathering/EventAction.cs b/AppControl Manager/IntelGathering/EventAction.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/EventAction.cs rename to AppControl Manager/IntelGathering/EventAction.cs diff --git a/AppControl Manager/Logic/IntelGathering/FileIdentity.cs b/AppControl Manager/IntelGathering/FileIdentity.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/FileIdentity.cs rename to AppControl Manager/IntelGathering/FileIdentity.cs diff --git a/AppControl Manager/Logic/IntelGathering/FileIdentityComparer.cs b/AppControl Manager/IntelGathering/FileIdentityComparer.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/FileIdentityComparer.cs rename to AppControl Manager/IntelGathering/FileIdentityComparer.cs diff --git a/AppControl Manager/Logic/IntelGathering/FileIdentityECCBasedHashSet.cs b/AppControl Manager/IntelGathering/FileIdentityECCBasedHashSet.cs similarity index 98% rename from AppControl Manager/Logic/IntelGathering/FileIdentityECCBasedHashSet.cs rename to AppControl Manager/IntelGathering/FileIdentityECCBasedHashSet.cs index b6c88734e..f98821705 100644 --- a/AppControl Manager/Logic/IntelGathering/FileIdentityECCBasedHashSet.cs +++ b/AppControl Manager/IntelGathering/FileIdentityECCBasedHashSet.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.IntelGathering; diff --git a/AppControl Manager/Logic/IntelGathering/FileIdentityOrigin.cs b/AppControl Manager/IntelGathering/FileIdentityOrigin.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/FileIdentityOrigin.cs rename to AppControl Manager/IntelGathering/FileIdentityOrigin.cs diff --git a/AppControl Manager/Logic/IntelGathering/FileIdentitySignatureBasedHashSet.cs b/AppControl Manager/IntelGathering/FileIdentitySignatureBasedHashSet.cs similarity index 99% rename from AppControl Manager/Logic/IntelGathering/FileIdentitySignatureBasedHashSet.cs rename to AppControl Manager/IntelGathering/FileIdentitySignatureBasedHashSet.cs index 164a06f18..e76dd707d 100644 --- a/AppControl Manager/Logic/IntelGathering/FileIdentitySignatureBasedHashSet.cs +++ b/AppControl Manager/IntelGathering/FileIdentitySignatureBasedHashSet.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.IntelGathering; diff --git a/AppControl Manager/Logic/IntelGathering/FileIdentityTimeBasedHashSet.cs b/AppControl Manager/IntelGathering/FileIdentityTimeBasedHashSet.cs similarity index 99% rename from AppControl Manager/Logic/IntelGathering/FileIdentityTimeBasedHashSet.cs rename to AppControl Manager/IntelGathering/FileIdentityTimeBasedHashSet.cs index f9e7f210d..027f2e2be 100644 --- a/AppControl Manager/Logic/IntelGathering/FileIdentityTimeBasedHashSet.cs +++ b/AppControl Manager/IntelGathering/FileIdentityTimeBasedHashSet.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.IntelGathering; diff --git a/AppControl Manager/Logic/IntelGathering/FileSignerInfo.cs b/AppControl Manager/IntelGathering/FileSignerInfo.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/FileSignerInfo.cs rename to AppControl Manager/IntelGathering/FileSignerInfo.cs diff --git a/AppControl Manager/Logic/IntelGathering/FileSignerInfoComparer.cs b/AppControl Manager/IntelGathering/FileSignerInfoComparer.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/FileSignerInfoComparer.cs rename to AppControl Manager/IntelGathering/FileSignerInfoComparer.cs diff --git a/AppControl Manager/Logic/IntelGathering/GetEventLogsData.cs b/AppControl Manager/IntelGathering/GetEventLogsData.cs similarity index 99% rename from AppControl Manager/Logic/IntelGathering/GetEventLogsData.cs rename to AppControl Manager/IntelGathering/GetEventLogsData.cs index d66486a23..810420a05 100644 --- a/AppControl Manager/Logic/IntelGathering/GetEventLogsData.cs +++ b/AppControl Manager/IntelGathering/GetEventLogsData.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Threading.Tasks; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.IntelGathering; diff --git a/AppControl Manager/Logic/IntelGathering/GetMDEAdvancedHuntingLogsData.cs b/AppControl Manager/IntelGathering/GetMDEAdvancedHuntingLogsData.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/GetMDEAdvancedHuntingLogsData.cs rename to AppControl Manager/IntelGathering/GetMDEAdvancedHuntingLogsData.cs diff --git a/AppControl Manager/Logic/IntelGathering/InferCertificatePresence.cs b/AppControl Manager/IntelGathering/InferCertificatePresence.cs similarity index 98% rename from AppControl Manager/Logic/IntelGathering/InferCertificatePresence.cs rename to AppControl Manager/IntelGathering/InferCertificatePresence.cs index 36197153e..a058f66e3 100644 --- a/AppControl Manager/Logic/IntelGathering/InferCertificatePresence.cs +++ b/AppControl Manager/IntelGathering/InferCertificatePresence.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Security.Cryptography.X509Certificates; -using AppControlManager.Logging; +using AppControlManager.Others; using AppControlManager.SiPolicy; -namespace AppControlManager.Logic.IntelGathering; +namespace AppControlManager.IntelGathering; internal static class CertificatePresence { diff --git a/AppControl Manager/Logic/IntelGathering/KernelModeDrivers.cs b/AppControl Manager/IntelGathering/KernelModeDrivers.cs similarity index 99% rename from AppControl Manager/Logic/IntelGathering/KernelModeDrivers.cs rename to AppControl Manager/IntelGathering/KernelModeDrivers.cs index ed1a38326..e48c956d3 100644 --- a/AppControl Manager/Logic/IntelGathering/KernelModeDrivers.cs +++ b/AppControl Manager/IntelGathering/KernelModeDrivers.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; -using AppControlManager.Logging; +using AppControlManager.Others; #pragma warning disable CS0649 diff --git a/AppControl Manager/Logic/IntelGathering/KernelUserVerdict.cs b/AppControl Manager/IntelGathering/KernelUserVerdict.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/KernelUserVerdict.cs rename to AppControl Manager/IntelGathering/KernelUserVerdict.cs diff --git a/AppControl Manager/Logic/IntelGathering/LocalFilesScan.cs b/AppControl Manager/IntelGathering/LocalFilesScan.cs similarity index 99% rename from AppControl Manager/Logic/IntelGathering/LocalFilesScan.cs rename to AppControl Manager/IntelGathering/LocalFilesScan.cs index 86413409f..ce3ec9b1d 100644 --- a/AppControl Manager/Logic/IntelGathering/LocalFilesScan.cs +++ b/AppControl Manager/IntelGathering/LocalFilesScan.cs @@ -8,7 +8,9 @@ using System.Security.Cryptography.X509Certificates; using System.Threading; using System.Threading.Tasks; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; +using AppControlManager.SimulationMethods; using Microsoft.UI.Xaml.Controls; namespace AppControlManager.IntelGathering; diff --git a/AppControl Manager/Logic/IntelGathering/MDEAdvancedHuntingData.cs b/AppControl Manager/IntelGathering/MDEAdvancedHuntingData.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/MDEAdvancedHuntingData.cs rename to AppControl Manager/IntelGathering/MDEAdvancedHuntingData.cs diff --git a/AppControl Manager/Logic/IntelGathering/OptimizeMDECSVData.cs b/AppControl Manager/IntelGathering/OptimizeMDECSVData.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/OptimizeMDECSVData.cs rename to AppControl Manager/IntelGathering/OptimizeMDECSVData.cs diff --git a/AppControl Manager/Logic/IntelGathering/PlatformInvocations.cs b/AppControl Manager/IntelGathering/PlatformInvocations.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/PlatformInvocations.cs rename to AppControl Manager/IntelGathering/PlatformInvocations.cs diff --git a/AppControl Manager/Logic/IntelGathering/PrepareEmptyPolicy.cs b/AppControl Manager/IntelGathering/PrepareEmptyPolicy.cs similarity index 96% rename from AppControl Manager/Logic/IntelGathering/PrepareEmptyPolicy.cs rename to AppControl Manager/IntelGathering/PrepareEmptyPolicy.cs index 5cae9d79c..0739eb16e 100644 --- a/AppControl Manager/Logic/IntelGathering/PrepareEmptyPolicy.cs +++ b/AppControl Manager/IntelGathering/PrepareEmptyPolicy.cs @@ -1,5 +1,5 @@ using System.IO; -using AppControlManager.Logging; +using AppControlManager.Others; using AppControlManager.XMLOps; namespace AppControlManager.IntelGathering; diff --git a/AppControl Manager/Logic/IntelGathering/ScanLevels.cs b/AppControl Manager/IntelGathering/ScanLevels.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/ScanLevels.cs rename to AppControl Manager/IntelGathering/ScanLevels.cs diff --git a/AppControl Manager/Logic/IntelGathering/SignatureStatus.cs b/AppControl Manager/IntelGathering/SignatureStatus.cs similarity index 100% rename from AppControl Manager/Logic/IntelGathering/SignatureStatus.cs rename to AppControl Manager/IntelGathering/SignatureStatus.cs diff --git a/AppControl Manager/Logic/Types And Definitions/FileAttribComparer .cs b/AppControl Manager/Logic/Types And Definitions/FileAttribComparer .cs deleted file mode 100644 index 4a224bf56..000000000 --- a/AppControl Manager/Logic/Types And Definitions/FileAttribComparer .cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace AppControlManager; - -/// -/// A custom equality comparer for the FileAttrib class. -/// This comparer is used to determine the uniqueness of FileAttrib instances -/// based on specific properties. -/// -public sealed class FileAttribComparer : IEqualityComparer -{ - /// - /// Determines whether two FileAttrib instances are equal. - /// The instances are considered equal if all six specified properties are the same. - /// - /// Both FileAttrib Instances Are Null: - /// Result: Equal (true). - /// - /// One Instance Is Null: - /// Result: Not equal (false). - /// - /// Both Instances Are Not Null, with Some Properties Null: - /// If a property is null in both instances, that property is considered equal. - /// If a property is null in one instance but has a value in the other, that property is considered not equal. - /// If all specified properties are equal (including handling of nulls), the instances are equal; otherwise, they are not. - /// - /// The first FileAttrib instance to compare. - /// The second FileAttrib instance to compare. - /// true if the instances are equal; otherwise, false. - public bool Equals(FileAttribX? x, FileAttribX? y) - { - // If both are null, they are considered equal - if (x is null && y is null) - return true; - - // If one is null and the other is not, they are not equal - if (x is null || y is null) - return false; - - // Compare the specified properties for equality using string comparison - return string.Equals(x.MinimumFileVersion, y.MinimumFileVersion, StringComparison.OrdinalIgnoreCase) && - string.Equals(x.FileDescription, y.FileDescription, StringComparison.OrdinalIgnoreCase) && - string.Equals(x.FileName, y.FileName, StringComparison.OrdinalIgnoreCase) && - string.Equals(x.InternalName, y.InternalName, StringComparison.OrdinalIgnoreCase) && - string.Equals(x.FilePath, y.FilePath, StringComparison.OrdinalIgnoreCase) && - string.Equals(x.ProductName, y.ProductName, StringComparison.OrdinalIgnoreCase); - } - - /// - /// Returns a hash code for the given FileAttrib instance. - /// The hash code is computed based on the six specified properties. - /// - /// The FileAttrib instance for which to get the hash code. - /// A hash code for the given FileAttrib instance. - public int GetHashCode(FileAttribX? obj) - { - // Return a default hash code (0) if obj is null to avoid exceptions - if (obj is null) return 0; - - // Initialize a hash variable - int hash = 17; - - // Combine hash codes of the specified properties using a common technique - // unchecked allows overflow but does not decrease accuracy of the HashSet. - // When implementing GetHashCode, the important aspect is that the same input will always yield the same output. - // Even if that output results in a wrapped value due to overflow, it will consistently represent that specific object. - - unchecked - { - hash = hash * 31 + (obj.MinimumFileVersion?.GetHashCode(StringComparison.OrdinalIgnoreCase) ?? 0); - hash = hash * 31 + (obj.FileDescription?.GetHashCode(StringComparison.OrdinalIgnoreCase) ?? 0); - hash = hash * 31 + (obj.FileName?.GetHashCode(StringComparison.OrdinalIgnoreCase) ?? 0); - hash = hash * 31 + (obj.InternalName?.GetHashCode(StringComparison.OrdinalIgnoreCase) ?? 0); - hash = hash * 31 + (obj.FilePath?.GetHashCode(StringComparison.OrdinalIgnoreCase) ?? 0); - hash = hash * 31 + (obj.ProductName?.GetHashCode(StringComparison.OrdinalIgnoreCase) ?? 0); - } - - // Return the computed hash code - return hash; - } -} diff --git a/AppControl Manager/Logic/Types And Definitions/FileAttribX.cs b/AppControl Manager/Logic/Types And Definitions/FileAttribX.cs deleted file mode 100644 index 15bde8490..000000000 --- a/AppControl Manager/Logic/Types And Definitions/FileAttribX.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Xml; - -namespace AppControlManager; - -// This class represents a node within a Code Integrity XML file -public sealed class FileAttribX -{ - public required XmlNode Node { get; set; } - public required XmlNode Signer { get; set; } - public required XmlNode AllowedSigner { get; set; } - public required XmlNode FileAttribRef { get; set; } - public required string Id { get; set; } - public string? MinimumFileVersion { get; set; } - public string? FileDescription { get; set; } - public string? FileName { get; set; } - public string? InternalName { get; set; } - public string? FilePath { get; set; } - public string? ProductName { get; set; } -} diff --git a/AppControl Manager/Logic/Main/AppControlSimulation.cs b/AppControl Manager/Main/AppControlSimulation.cs similarity index 97% rename from AppControl Manager/Logic/Main/AppControlSimulation.cs rename to AppControl Manager/Main/AppControlSimulation.cs index 4eec74f42..6de340df8 100644 --- a/AppControl Manager/Logic/Main/AppControlSimulation.cs +++ b/AppControl Manager/Main/AppControlSimulation.cs @@ -10,11 +10,12 @@ using System.Threading; using System.Threading.Tasks; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Others; +using AppControlManager.SimulationMethods; using AppControlManager.XMLOps; using Microsoft.UI.Xaml.Controls; -namespace AppControlManager; +namespace AppControlManager.Main; internal static class AppControlSimulation { @@ -29,7 +30,7 @@ internal static class AppControlSimulation internal static bool Invoke(List? filePaths, string xmlFilePath, bool noCatalogScanning) { // Call the main method to get the verdicts - ConcurrentDictionary Results = (Invoke(filePaths, null, xmlFilePath, noCatalogScanning, false, null, 2)); + ConcurrentDictionary Results = Invoke(filePaths, null, xmlFilePath, noCatalogScanning, false, null, 2); // See if there are any unauthorized files IEnumerable ResultsAfterFilter = Results.Values.Where(R => !R.IsAuthorized); @@ -249,7 +250,7 @@ internal static ConcurrentDictionary Invoke( double AllFilesCount = CollectedFiles.Count; // split the file paths by ThreadsCount which by default is 2 and minimum 1 - IEnumerable SplitArrays = Enumerable.Chunk(CollectedFiles, (int)Math.Ceiling(AllFilesCount / threadsCount)); + IEnumerable SplitArrays = CollectedFiles.Chunk((int)Math.Ceiling(AllFilesCount / threadsCount)); // List of tasks to run in parallel List tasks = []; @@ -273,7 +274,7 @@ internal static ConcurrentDictionary Invoke( // Update progress bar safely on the UI thread _ = UIProgressBar.DispatcherQueue.TryEnqueue(() => { - double progressPercentage = (processedFilesCount / AllFilesCount) * 100; + double progressPercentage = processedFilesCount / AllFilesCount * 100; UIProgressBar.Value = Math.Min(progressPercentage, 100); }); @@ -310,8 +311,8 @@ internal static ConcurrentDictionary Invoke( continue; } - String CurrentFilePathHashSHA256; - String CurrentFilePathHashSHA1; + string CurrentFilePathHashSHA256; + string CurrentFilePathHashSHA1; try { diff --git a/AppControl Manager/Logic/Main/BasePolicyCreator.cs b/AppControl Manager/Main/BasePolicyCreator.cs similarity index 99% rename from AppControl Manager/Logic/Main/BasePolicyCreator.cs rename to AppControl Manager/Main/BasePolicyCreator.cs index 67bf16f1a..a8a9af7cd 100644 --- a/AppControl Manager/Logic/Main/BasePolicyCreator.cs +++ b/AppControl Manager/Main/BasePolicyCreator.cs @@ -9,11 +9,10 @@ using System.Text.Json; using System.Text.RegularExpressions; using System.Xml; -using AppControlManager.Logging; -using AppControlManager.Logic; +using AppControlManager.Others; using AppControlManager.XMLOps; -namespace AppControlManager; +namespace AppControlManager.Main; internal static partial class BasePolicyCreator { diff --git a/AppControl Manager/Logic/Main/GetCIPolicySetting.cs b/AppControl Manager/Main/GetCIPolicySetting.cs similarity index 97% rename from AppControl Manager/Logic/Main/GetCIPolicySetting.cs rename to AppControl Manager/Main/GetCIPolicySetting.cs index e5281f5e7..b6e0ee397 100644 --- a/AppControl Manager/Logic/Main/GetCIPolicySetting.cs +++ b/AppControl Manager/Main/GetCIPolicySetting.cs @@ -1,6 +1,7 @@ using System.Runtime.InteropServices; +using AppControlManager.Others; -namespace AppControlManager; +namespace AppControlManager.Main; internal sealed class SecurePolicySetting(object? Value, WLDP_SECURE_SETTING_VALUE_TYPE ValueType, uint ValueSize, bool Status, int StatusCode) { diff --git a/AppControl Manager/Logic/Main/GetCiFileHashes.cs b/AppControl Manager/Main/GetCiFileHashes.cs similarity index 85% rename from AppControl Manager/Logic/Main/GetCiFileHashes.cs rename to AppControl Manager/Main/GetCiFileHashes.cs index 8fa3c8e22..3f6f17585 100644 --- a/AppControl Manager/Logic/Main/GetCiFileHashes.cs +++ b/AppControl Manager/Main/GetCiFileHashes.cs @@ -3,8 +3,9 @@ using System.IO; using System.Runtime.InteropServices; using System.Text; +using AppControlManager.Others; -namespace AppControlManager; +namespace AppControlManager.Main; internal static class CiFileHash { @@ -27,8 +28,8 @@ internal static CodeIntegrityHashes GetCiFileHashes(string filePath) { // A StringBuilder object to store the hash value as a hexadecimal string StringBuilder hashString = new(64); - IntPtr contextHandle = IntPtr.Zero; - IntPtr hashValue = IntPtr.Zero; + nint contextHandle = nint.Zero; + nint hashValue = nint.Zero; try { @@ -37,19 +38,19 @@ internal static CodeIntegrityHashes GetCiFileHashes(string filePath) // DangerousGetHandle returns the handle to the file stream nint fileStreamHandle = fileStream.SafeFileHandle.DangerousGetHandle(); - if (fileStreamHandle == IntPtr.Zero) + if (fileStreamHandle == nint.Zero) { return null; } - if (!WinTrust.CryptCATAdminAcquireContext2(ref contextHandle, IntPtr.Zero, hashAlgorithm, IntPtr.Zero, 0)) + if (!WinTrust.CryptCATAdminAcquireContext2(ref contextHandle, nint.Zero, hashAlgorithm, nint.Zero, 0)) { throw new InvalidOperationException($"Could not acquire context for {hashAlgorithm}"); } int hashSize = 0; - if (!WinTrust.CryptCATAdminCalcHashFromFileHandle3(contextHandle, fileStreamHandle, ref hashSize, IntPtr.Zero, WinTrust.CryptcatadminCalchashFlagNonconformantFilesFallbackFlat)) + if (!WinTrust.CryptCATAdminCalcHashFromFileHandle3(contextHandle, fileStreamHandle, ref hashSize, nint.Zero, WinTrust.CryptcatadminCalchashFlagNonconformantFilesFallbackFlat)) { throw new InvalidOperationException($"Could not hash {filePath} using {hashAlgorithm}"); } @@ -72,12 +73,12 @@ internal static CodeIntegrityHashes GetCiFileHashes(string filePath) finally { - if (hashValue != IntPtr.Zero) + if (hashValue != nint.Zero) { Marshal.FreeHGlobal(hashValue); } - if (contextHandle != IntPtr.Zero) + if (contextHandle != nint.Zero) { _ = WinTrust.CryptCATAdminReleaseContext(contextHandle, 0); } diff --git a/AppControl Manager/Logic/Main/SetCiRuleOptions.cs b/AppControl Manager/Main/SetCiRuleOptions.cs similarity index 98% rename from AppControl Manager/Logic/Main/SetCiRuleOptions.cs rename to AppControl Manager/Main/SetCiRuleOptions.cs index c980a699a..2b1097f6b 100644 --- a/AppControl Manager/Logic/Main/SetCiRuleOptions.cs +++ b/AppControl Manager/Main/SetCiRuleOptions.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Others; using AppControlManager.XMLOps; -namespace AppControlManager; +namespace AppControlManager.Main; internal static class CiRuleOptions { @@ -392,7 +392,7 @@ internal static void Set( // Make sure Supplemental policies only contain rule options that are applicable to them - if ((template is not null && template is PolicyTemplate.Supplemental) || string.Equals(PolicyType, "Supplemental Policy", StringComparison.OrdinalIgnoreCase)) + if (template is not null && template is PolicyTemplate.Supplemental || string.Equals(PolicyType, "Supplemental Policy", StringComparison.OrdinalIgnoreCase)) { List SupplementalPolicyAllowedRuleOptions = [18, 14, 13, 7, 5, 6]; diff --git a/AppControl Manager/Logic/Main/TestCiPolicy.cs b/AppControl Manager/Main/TestCiPolicy.cs similarity index 96% rename from AppControl Manager/Logic/Main/TestCiPolicy.cs rename to AppControl Manager/Main/TestCiPolicy.cs index 5532e8f6a..49c8d4c2e 100644 --- a/AppControl Manager/Logic/Main/TestCiPolicy.cs +++ b/AppControl Manager/Main/TestCiPolicy.cs @@ -2,8 +2,9 @@ using System.IO; using System.Xml; using System.Xml.Schema; +using AppControlManager.Others; -namespace AppControlManager; +namespace AppControlManager.Main; internal static class CiPolicyTest { diff --git a/AppControl Manager/Logic/Main/UserConfiguration.cs b/AppControl Manager/Main/UserConfiguration.cs similarity index 98% rename from AppControl Manager/Logic/Main/UserConfiguration.cs rename to AppControl Manager/Main/UserConfiguration.cs index ec4a497c9..3273905c1 100644 --- a/AppControl Manager/Logic/Main/UserConfiguration.cs +++ b/AppControl Manager/Main/UserConfiguration.cs @@ -4,11 +4,11 @@ using System.Linq; using System.Text.Json; using System.Text.Json.Serialization; -using AppControlManager.Logging; +using AppControlManager.IntelGathering; +using AppControlManager.Others; using AppControlManager.Sidebar; -namespace AppControlManager; - +namespace AppControlManager.Main; // This is to ensure the Serialize method works when trimming is enabled // Using source-generated context improves performance @@ -119,7 +119,7 @@ internal static UserConfiguration Set( // Validate the SignedPolicyPath parameter if (!string.IsNullOrWhiteSpace(SignedPolicyPath)) { - if (PolicyFileSigningStatusDetection.Check(SignedPolicyPath) is not IntelGathering.SignatureStatus.IsSigned) + if (PolicyFileSigningStatusDetection.Check(SignedPolicyPath) is not SignatureStatus.IsSigned) { throw new InvalidOperationException($"The specified policy file '{SignedPolicyPath}' is not signed. Please provide a signed policy file."); } @@ -128,7 +128,7 @@ internal static UserConfiguration Set( // Validate the UnsignedPolicyPath parameter if (!string.IsNullOrWhiteSpace(UnsignedPolicyPath)) { - if (PolicyFileSigningStatusDetection.Check(UnsignedPolicyPath) is IntelGathering.SignatureStatus.IsSigned) + if (PolicyFileSigningStatusDetection.Check(UnsignedPolicyPath) is SignatureStatus.IsSigned) { throw new InvalidOperationException($"The specified policy file '{UnsignedPolicyPath}' is signed. Please provide an Unsigned policy file."); } diff --git a/AppControl Manager/MainWindow.xaml.cs b/AppControl Manager/MainWindow.xaml.cs index 8a7d70a6e..daea3e888 100644 --- a/AppControl Manager/MainWindow.xaml.cs +++ b/AppControl Manager/MainWindow.xaml.cs @@ -5,7 +5,9 @@ using System.Numerics; using System.Threading.Tasks; using AnimatedVisuals; -using AppControlManager.Logging; +using AppControlManager.AppSettings; +using AppControlManager.Main; +using AppControlManager.Others; using AppControlManager.Sidebar; using Microsoft.UI; using Microsoft.UI.Composition.SystemBackdrops; @@ -306,7 +308,7 @@ static IEnumerable GetAllChildren(NavigationViewItem parent) // If AutoCheckForUpdateAtStartup is enabled in the app settings, checks for updates on startup and displays a dot on the Update page in the navigation // If a new version is available. // Will also check for update if it's null meaning user hasn't configured the auto update check yet - if (AppSettings.TryGetSetting(AppSettings.SettingKeys.AutoCheckForUpdateAtStartup) ?? true) + if (AppSettingsCls.TryGetSetting(AppSettingsCls.SettingKeys.AutoCheckForUpdateAtStartup) ?? true) { Logger.Write("Checking for update on startup"); @@ -339,16 +341,16 @@ static IEnumerable GetAllChildren(NavigationViewItem parent) .First(item => string.Equals(item.Content.ToString(), "Create Policy", StringComparison.OrdinalIgnoreCase)); // Set the initial background setting based on the user's settings - OnNavigationBackgroundChanged(null, new(AppSettings.GetSetting(AppSettings.SettingKeys.NavViewBackground))); + OnNavigationBackgroundChanged(null, new(AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.NavViewBackground))); // Set the initial BackDrop setting based on the user's settings - OnBackgroundChanged(null, new(AppSettings.GetSetting(AppSettings.SettingKeys.BackDropBackground))); + OnBackgroundChanged(null, new(AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.BackDropBackground))); // Set the initial App Theme based on the user's settings - OnAppThemeChanged(null, new(AppSettings.GetSetting(AppSettings.SettingKeys.AppTheme))); + OnAppThemeChanged(null, new(AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.AppTheme))); // Set the initial Icons styles abased on the user's settings - OnIconsStylesChanged(null, new(AppSettings.GetSetting(AppSettings.SettingKeys.IconsStyle))); + OnIconsStylesChanged(null, new(AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.IconsStyle))); // Restore window size on startup RestoreWindowSize(); @@ -496,8 +498,8 @@ private void MainWindow_Closed(object sender, WindowEventArgs args) SizeInt32 size = appWindow.Size; // Save to window width and height to the app settings - AppSettings.SaveSetting(AppSettings.SettingKeys.MainWindowWidth, size.Width); - AppSettings.SaveSetting(AppSettings.SettingKeys.MainWindowHeight, size.Height); + AppSettingsCls.SaveSetting(AppSettingsCls.SettingKeys.MainWindowWidth, size.Width); + AppSettingsCls.SaveSetting(AppSettingsCls.SettingKeys.MainWindowHeight, size.Height); Win32InteropInternal.WINDOWPLACEMENT windowPlacement = new(); @@ -507,11 +509,11 @@ private void MainWindow_Closed(object sender, WindowEventArgs args) // Save the maximized status of the window before closing to the app settings if (windowPlacement.showCmd is Win32InteropInternal.ShowWindowCommands.SW_SHOWMAXIMIZED) { - AppSettings.SaveSetting(AppSettings.SettingKeys.MainWindowIsMaximized, true); + AppSettingsCls.SaveSetting(AppSettingsCls.SettingKeys.MainWindowIsMaximized, true); } else { - AppSettings.SaveSetting(AppSettings.SettingKeys.MainWindowIsMaximized, false); + AppSettingsCls.SaveSetting(AppSettingsCls.SettingKeys.MainWindowIsMaximized, false); } } @@ -525,7 +527,7 @@ private static void RestoreWindowSize() AppWindow appWindow = GetAppWindowForCurrentWindow(); // If the window was last maximized then restore it to maximized - if (AppSettings.GetSetting(AppSettings.SettingKeys.MainWindowIsMaximized)) + if (AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.MainWindowIsMaximized)) { // Set the presenter to maximized ((OverlappedPresenter)appWindow.Presenter).Maximize(); @@ -535,8 +537,8 @@ private static void RestoreWindowSize() else { // Retrieve stored values - int width = AppSettings.GetSetting(AppSettings.SettingKeys.MainWindowWidth); - int height = AppSettings.GetSetting(AppSettings.SettingKeys.MainWindowHeight); + int width = AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.MainWindowWidth); + int height = AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.MainWindowHeight); // If the previous window size was smaller than 200 pixels width/height then do not use it, let it use the natural window size if (width > 200 && height > 200) @@ -1169,7 +1171,7 @@ private void OnAppThemeChanged(object? sender, AppThemeChangedEventArgs e) RootGrid.RequestedTheme = ElementTheme.Light; // Change the navigation icons based on dark/light theme only if "Animated" is the current icons style in use - if (string.Equals(AppSettings.GetSetting(AppSettings.SettingKeys.IconsStyle), "Animated", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.IconsStyle), "Animated", StringComparison.OrdinalIgnoreCase)) { AllowNewAppsNavItem.Icon = new AnimatedIcon @@ -1194,7 +1196,7 @@ private void OnAppThemeChanged(object? sender, AppThemeChangedEventArgs e) RootGrid.RequestedTheme = ElementTheme.Dark; // Change the navigation icons based on dark/light theme only if "Animated" is the current icons style in use - if (string.Equals(AppSettings.GetSetting(AppSettings.SettingKeys.IconsStyle), "Animated", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.IconsStyle), "Animated", StringComparison.OrdinalIgnoreCase)) { AllowNewAppsNavItem.Icon = new AnimatedIcon @@ -1223,7 +1225,7 @@ private void OnAppThemeChanged(object? sender, AppThemeChangedEventArgs e) if (currentColorMode is ElementTheme.Dark) { // Change the navigation icons based on dark/light theme only if "Animated" is the current icons style in use - if (string.Equals(AppSettings.GetSetting(AppSettings.SettingKeys.IconsStyle), "Animated", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.IconsStyle), "Animated", StringComparison.OrdinalIgnoreCase)) { AllowNewAppsNavItem.Icon = new AnimatedIcon @@ -1244,7 +1246,7 @@ private void OnAppThemeChanged(object? sender, AppThemeChangedEventArgs e) else { // Change the navigation icons based on dark/light theme only if "Animated" is the current icons style in use - if (string.Equals(AppSettings.GetSetting(AppSettings.SettingKeys.IconsStyle), "Animated", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(AppSettingsCls.GetSetting(AppSettingsCls.SettingKeys.IconsStyle), "Animated", StringComparison.OrdinalIgnoreCase)) { AllowNewAppsNavItem.Icon = new AnimatedIcon @@ -1668,7 +1670,7 @@ private void RootGrid_Loaded(object sender, RoutedEventArgs e) SidebarBasePolicyPathTextBox.Text = UserConfiguration.Get().UnsignedPolicyPath; // Set the status of the sidebar toggle switch for auto assignment by getting it from saved app settings - AutomaticAssignmentSidebarToggleSwitch.IsOn = AppSettings.TryGetSetting(AppSettings.SettingKeys.AutomaticAssignmentSidebar) ?? true; + AutomaticAssignmentSidebarToggleSwitch.IsOn = AppSettingsCls.TryGetSetting(AppSettingsCls.SettingKeys.AutomaticAssignmentSidebar) ?? true; } @@ -1712,7 +1714,7 @@ private void AutomaticAssignmentSidebarSettingsCard_Click(object sender, RoutedE AutomaticAssignmentSidebarToggleSwitch.IsOn = !AutomaticAssignmentSidebarToggleSwitch.IsOn; // Save the status in app settings - AppSettings.SaveSetting(AppSettings.SettingKeys.AutomaticAssignmentSidebar, AutomaticAssignmentSidebarToggleSwitch.IsOn); + AppSettingsCls.SaveSetting(AppSettingsCls.SettingKeys.AutomaticAssignmentSidebar, AutomaticAssignmentSidebarToggleSwitch.IsOn); } @@ -1724,7 +1726,7 @@ private void AutomaticAssignmentSidebarSettingsCard_Click(object sender, RoutedE private void AutomaticAssignmentSidebarToggleSwitch_Toggled(object sender, RoutedEventArgs e) { // Save the status in app settings - AppSettings.SaveSetting(AppSettings.SettingKeys.AutomaticAssignmentSidebar, AutomaticAssignmentSidebarToggleSwitch.IsOn); + AppSettingsCls.SaveSetting(AppSettingsCls.SettingKeys.AutomaticAssignmentSidebar, AutomaticAssignmentSidebarToggleSwitch.IsOn); } diff --git a/AppControl Manager/Logic/AllCertificatesGrabber.cs b/AppControl Manager/Others/AllCertificatesGrabber.cs similarity index 99% rename from AppControl Manager/Logic/AllCertificatesGrabber.cs rename to AppControl Manager/Others/AllCertificatesGrabber.cs index 7c1eeb6c9..c80029751 100644 --- a/AppControl Manager/Logic/AllCertificatesGrabber.cs +++ b/AppControl Manager/Others/AllCertificatesGrabber.cs @@ -8,7 +8,7 @@ // The following functions and methods use the Windows APIs to grab all of the certificates from a signed file -namespace AppControlManager; +namespace AppControlManager.Others; // a class to throw a custom exception when the certificate has HashMismatch diff --git a/AppControl Manager/Logic/AppUpdate.cs b/AppControl Manager/Others/AppUpdate.cs similarity index 97% rename from AppControl Manager/Logic/AppUpdate.cs rename to AppControl Manager/Others/AppUpdate.cs index 4f885c94d..eaba240c9 100644 --- a/AppControl Manager/Logic/AppUpdate.cs +++ b/AppControl Manager/Others/AppUpdate.cs @@ -1,8 +1,7 @@ using System; using System.Net.Http; -using AppControlManager.Logic; -namespace AppControlManager; +namespace AppControlManager.Others; /// /// AppUpdate class is responsible for checking for application updates. diff --git a/AppControl Manager/Logic/Types And Definitions/AuthenticodePageHashes.cs b/AppControl Manager/Others/AuthenticodePageHashes.cs similarity index 91% rename from AppControl Manager/Logic/Types And Definitions/AuthenticodePageHashes.cs rename to AppControl Manager/Others/AuthenticodePageHashes.cs index ade7852ec..352dda4ca 100644 --- a/AppControl Manager/Logic/Types And Definitions/AuthenticodePageHashes.cs +++ b/AppControl Manager/Others/AuthenticodePageHashes.cs @@ -1,5 +1,4 @@ - -namespace AppControlManager; +namespace AppControlManager.Others; public sealed class CodeIntegrityHashes(string? sha1Page, string? sha256Page, string? sha1Authenticode, string? sha256Authenticode) { diff --git a/AppControl Manager/Logic/CertificateCreator.cs b/AppControl Manager/Others/CertificateCreator.cs similarity index 99% rename from AppControl Manager/Logic/CertificateCreator.cs rename to AppControl Manager/Others/CertificateCreator.cs index 2618c5128..e062d4444 100644 --- a/AppControl Manager/Logic/CertificateCreator.cs +++ b/AppControl Manager/Others/CertificateCreator.cs @@ -3,9 +3,9 @@ using System.IO; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using AppControlManager.Logging; +using AppControlManager.Main; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class CertificateGenerator { diff --git a/AppControl Manager/Logic/Types And Definitions/CertificateDetailsCreator.cs b/AppControl Manager/Others/CertificateDetailsCreator.cs similarity index 91% rename from AppControl Manager/Logic/Types And Definitions/CertificateDetailsCreator.cs rename to AppControl Manager/Others/CertificateDetailsCreator.cs index a839b46a5..206812a59 100644 --- a/AppControl Manager/Logic/Types And Definitions/CertificateDetailsCreator.cs +++ b/AppControl Manager/Others/CertificateDetailsCreator.cs @@ -1,5 +1,4 @@ - -namespace AppControlManager; +namespace AppControlManager.Others; public sealed class CertificateDetailsCreator(string intermediateCertTBS, string intermediateCertName, string leafCertTBS, string leafCertName) { @@ -7,4 +6,4 @@ public sealed class CertificateDetailsCreator(string intermediateCertTBS, string public string IntermediateCertName { get; set; } = intermediateCertName; public string LeafCertTBS { get; set; } = leafCertTBS; public string LeafCertName { get; set; } = leafCertName; -} \ No newline at end of file +} diff --git a/AppControl Manager/Logic/CertificateHelper.cs b/AppControl Manager/Others/CertificateHelper.cs similarity index 99% rename from AppControl Manager/Logic/CertificateHelper.cs rename to AppControl Manager/Others/CertificateHelper.cs index 103881f8e..1641b69ad 100644 --- a/AppControl Manager/Logic/CertificateHelper.cs +++ b/AppControl Manager/Others/CertificateHelper.cs @@ -3,7 +3,7 @@ using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class CertificateHelper { diff --git a/AppControl Manager/Logic/Types And Definitions/CertificateSignerCreator.cs b/AppControl Manager/Others/CertificateSignerCreator.cs similarity index 87% rename from AppControl Manager/Logic/Types And Definitions/CertificateSignerCreator.cs rename to AppControl Manager/Others/CertificateSignerCreator.cs index 05247c4a9..6d8f062bb 100644 --- a/AppControl Manager/Logic/Types And Definitions/CertificateSignerCreator.cs +++ b/AppControl Manager/Others/CertificateSignerCreator.cs @@ -1,5 +1,4 @@ - -namespace AppControlManager; +namespace AppControlManager.Others; public sealed class CertificateSignerCreator(string tbs, string signerName, int siSigningScenario) { diff --git a/AppControl Manager/Logic/Types And Definitions/ChainElement.cs b/AppControl Manager/Others/ChainElement.cs similarity index 95% rename from AppControl Manager/Logic/Types And Definitions/ChainElement.cs rename to AppControl Manager/Others/ChainElement.cs index e8177e1b4..23b5019d9 100644 --- a/AppControl Manager/Logic/Types And Definitions/ChainElement.cs +++ b/AppControl Manager/Others/ChainElement.cs @@ -1,7 +1,7 @@ using System; using System.Security.Cryptography.X509Certificates; -namespace AppControlManager; +namespace AppControlManager.Others; // the enum for CertificateType public enum CertificateType diff --git a/AppControl Manager/Logic/Types And Definitions/ChainPackage.cs b/AppControl Manager/Others/ChainPackage.cs similarity index 94% rename from AppControl Manager/Logic/Types And Definitions/ChainPackage.cs rename to AppControl Manager/Others/ChainPackage.cs index dbc123e4b..6a938dffd 100644 --- a/AppControl Manager/Logic/Types And Definitions/ChainPackage.cs +++ b/AppControl Manager/Others/ChainPackage.cs @@ -1,7 +1,7 @@ using System.Security.Cryptography.Pkcs; using System.Security.Cryptography.X509Certificates; -namespace AppControlManager; +namespace AppControlManager.Others; public sealed class ChainPackage(X509Chain certificatechain, SignedCms signedcms, ChainElement rootcertificate, ChainElement[]? intermediatecertificates, diff --git a/AppControl Manager/Logic/CheckPolicyDeploymentStatus.cs b/AppControl Manager/Others/CheckPolicyDeploymentStatus.cs similarity index 97% rename from AppControl Manager/Logic/CheckPolicyDeploymentStatus.cs rename to AppControl Manager/Others/CheckPolicyDeploymentStatus.cs index 97ecf2007..c53fe0f83 100644 --- a/AppControl Manager/Logic/CheckPolicyDeploymentStatus.cs +++ b/AppControl Manager/Others/CheckPolicyDeploymentStatus.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class CheckPolicyDeploymentStatus { diff --git a/AppControl Manager/Logic/CiToolHelper.cs b/AppControl Manager/Others/CiToolHelper.cs similarity index 99% rename from AppControl Manager/Logic/CiToolHelper.cs rename to AppControl Manager/Others/CiToolHelper.cs index f58d3765e..2599b92f6 100644 --- a/AppControl Manager/Logic/CiToolHelper.cs +++ b/AppControl Manager/Others/CiToolHelper.cs @@ -5,9 +5,8 @@ using System.IO; using System.Text; using System.Text.Json; -using AppControlManager.Logging; -namespace AppControlManager; +namespace AppControlManager.Others; // Class to represent a policy with various attributes public sealed class CiPolicyInfo diff --git a/AppControl Manager/Logic/CodeIntegrityInfo.cs b/AppControl Manager/Others/CodeIntegrityInfo.cs similarity index 100% rename from AppControl Manager/Logic/CodeIntegrityInfo.cs rename to AppControl Manager/Others/CodeIntegrityInfo.cs diff --git a/AppControl Manager/Logic/Types And Definitions/CodeIntegrityPolicy.cs b/AppControl Manager/Others/CodeIntegrityPolicy.cs similarity index 99% rename from AppControl Manager/Logic/Types And Definitions/CodeIntegrityPolicy.cs rename to AppControl Manager/Others/CodeIntegrityPolicy.cs index af3f347e8..cb0a7ec66 100644 --- a/AppControl Manager/Logic/Types And Definitions/CodeIntegrityPolicy.cs +++ b/AppControl Manager/Others/CodeIntegrityPolicy.cs @@ -1,7 +1,7 @@ using System; using System.Xml; -namespace AppControlManager; +namespace AppControlManager.Others; // This class represents a single Code Integrity XML policy // It Makes sure PolicyType attribute, BasePolicyID node and PolicyID nodes exist and remove PolicyTypeID node if it exists diff --git a/AppControl Manager/Logic/ConfigureISGServices.cs b/AppControl Manager/Others/ConfigureISGServices.cs similarity index 93% rename from AppControl Manager/Logic/ConfigureISGServices.cs rename to AppControl Manager/Others/ConfigureISGServices.cs index 9e5d5c7bd..911d7d65c 100644 --- a/AppControl Manager/Logic/ConfigureISGServices.cs +++ b/AppControl Manager/Others/ConfigureISGServices.cs @@ -1,6 +1,4 @@ -using AppControlManager.Logging; - -namespace AppControlManager; +namespace AppControlManager.Others; internal static class ConfigureISGServices { diff --git a/AppControl Manager/Logic/Crypt32CertCN.cs b/AppControl Manager/Others/Crypt32CertCN.cs similarity index 98% rename from AppControl Manager/Logic/Crypt32CertCN.cs rename to AppControl Manager/Others/Crypt32CertCN.cs index 67e7f7760..d5cf1eaf7 100644 --- a/AppControl Manager/Logic/Crypt32CertCN.cs +++ b/AppControl Manager/Others/Crypt32CertCN.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.InteropServices; -namespace AppControlManager; +namespace AppControlManager.Others; internal static partial class CryptoAPI { diff --git a/AppControl Manager/Logic/DeviceGuardInfo.cs b/AppControl Manager/Others/DeviceGuardInfo.cs similarity index 98% rename from AppControl Manager/Logic/DeviceGuardInfo.cs rename to AppControl Manager/Others/DeviceGuardInfo.cs index 9ce82fc84..8c6d7a026 100644 --- a/AppControl Manager/Logic/DeviceGuardInfo.cs +++ b/AppControl Manager/Others/DeviceGuardInfo.cs @@ -1,7 +1,7 @@ using System.Linq; using System.Management; -namespace AppControlManager; +namespace AppControlManager.Others; internal sealed class DeviceGuardStatus { diff --git a/AppControl Manager/Logic/EventLogUtility.cs b/AppControl Manager/Others/EventLogUtility.cs similarity index 97% rename from AppControl Manager/Logic/EventLogUtility.cs rename to AppControl Manager/Others/EventLogUtility.cs index 6289e4a0b..d65ac70b6 100644 --- a/AppControl Manager/Logic/EventLogUtility.cs +++ b/AppControl Manager/Others/EventLogUtility.cs @@ -1,9 +1,8 @@ using System; using System.Diagnostics.Eventing.Reader; using System.IO; -using AppControlManager.Logging; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class EventLogUtility { diff --git a/AppControl Manager/Logic/Types And Definitions/FileBasedInfoPackage.cs b/AppControl Manager/Others/FileBasedInfoPackage.cs similarity index 94% rename from AppControl Manager/Logic/Types And Definitions/FileBasedInfoPackage.cs rename to AppControl Manager/Others/FileBasedInfoPackage.cs index b6ce80bd6..85dbc446c 100644 --- a/AppControl Manager/Logic/Types And Definitions/FileBasedInfoPackage.cs +++ b/AppControl Manager/Others/FileBasedInfoPackage.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace AppControlManager; +namespace AppControlManager.Others; // Used by the BuildSignerAndHashObjects method to store and return the output internal sealed class FileBasedInfoPackage(List filepublishersigners, List publishersigners, List completehashes) diff --git a/AppControl Manager/Logic/FileCertificateInfoCol.cs b/AppControl Manager/Others/FileCertificateInfoCol.cs similarity index 94% rename from AppControl Manager/Logic/FileCertificateInfoCol.cs rename to AppControl Manager/Others/FileCertificateInfoCol.cs index 05cff957d..b00f2fc4f 100644 --- a/AppControl Manager/Logic/FileCertificateInfoCol.cs +++ b/AppControl Manager/Others/FileCertificateInfoCol.cs @@ -1,6 +1,6 @@ using System; -namespace AppControlManager; +namespace AppControlManager.Others; // a class that represents each certificate in a chain // Used by the DataGrid in the View File Certificates page diff --git a/AppControl Manager/Logic/FileDialogHelper.cs b/AppControl Manager/Others/FileDialogHelper.cs similarity index 99% rename from AppControl Manager/Logic/FileDialogHelper.cs rename to AppControl Manager/Others/FileDialogHelper.cs index a837f8487..31cfccd8f 100644 --- a/AppControl Manager/Logic/FileDialogHelper.cs +++ b/AppControl Manager/Others/FileDialogHelper.cs @@ -7,7 +7,7 @@ using Windows.Win32.UI.Shell; using Windows.Win32.UI.Shell.Common; -namespace AppControlManager; +namespace AppControlManager.Others; /// /// https://learn.microsoft.com/en-us/uwp/api/windows.storage.pickers.filesavepicker?view=winrt-26100 diff --git a/AppControl Manager/Logic/Types And Definitions/FilePublisherSignerCreator.cs b/AppControl Manager/Others/FilePublisherSignerCreator.cs similarity index 97% rename from AppControl Manager/Logic/Types And Definitions/FilePublisherSignerCreator.cs rename to AppControl Manager/Others/FilePublisherSignerCreator.cs index 8dc2ec552..33e5ee315 100644 --- a/AppControl Manager/Logic/Types And Definitions/FilePublisherSignerCreator.cs +++ b/AppControl Manager/Others/FilePublisherSignerCreator.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace AppControlManager; +namespace AppControlManager.Others; internal sealed class FilePublisherSignerCreator { diff --git a/AppControl Manager/Logic/GetExtendedFileAttrib.cs b/AppControl Manager/Others/GetExtendedFileAttrib.cs similarity index 99% rename from AppControl Manager/Logic/GetExtendedFileAttrib.cs rename to AppControl Manager/Others/GetExtendedFileAttrib.cs index 90590a23a..53f591c00 100644 --- a/AppControl Manager/Logic/GetExtendedFileAttrib.cs +++ b/AppControl Manager/Others/GetExtendedFileAttrib.cs @@ -2,7 +2,7 @@ using System.Globalization; using System.Runtime.InteropServices; -namespace AppControlManager; +namespace AppControlManager.Others; public sealed partial class ExFileInfo { diff --git a/AppControl Manager/Logic/GetFilesFast.cs b/AppControl Manager/Others/GetFilesFast.cs similarity index 99% rename from AppControl Manager/Logic/GetFilesFast.cs rename to AppControl Manager/Others/GetFilesFast.cs index 100c72311..b6daf3652 100644 --- a/AppControl Manager/Logic/GetFilesFast.cs +++ b/AppControl Manager/Others/GetFilesFast.cs @@ -4,9 +4,8 @@ using System.Diagnostics; using System.IO; using System.Threading.Tasks; -using AppControlManager.Logging; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class FileUtility { diff --git a/AppControl Manager/Logic/GetOpusData.cs b/AppControl Manager/Others/GetOpusData.cs similarity index 99% rename from AppControl Manager/Logic/GetOpusData.cs rename to AppControl Manager/Others/GetOpusData.cs index 2226af9e9..f41de7dfd 100644 --- a/AppControl Manager/Logic/GetOpusData.cs +++ b/AppControl Manager/Others/GetOpusData.cs @@ -4,7 +4,7 @@ using System.Security.Cryptography; using System.Security.Cryptography.Pkcs; -namespace AppControlManager; +namespace AppControlManager.Others; // https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-oshared/91755632-4b0d-44ca-89a9-9699afbbd268 // Rust implementation: https://microsoft.github.io/windows-docs-rs/doc/windows/Win32/Security/WinTrust/struct.SPC_SP_OPUS_INFO.html diff --git a/AppControl Manager/Logic/GlobalVars.cs b/AppControl Manager/Others/GlobalVars.cs similarity index 99% rename from AppControl Manager/Logic/GlobalVars.cs rename to AppControl Manager/Others/GlobalVars.cs index 0c3b9745a..5e3074b7b 100644 --- a/AppControl Manager/Logic/GlobalVars.cs +++ b/AppControl Manager/Others/GlobalVars.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace AppControlManager; +namespace AppControlManager.Others; // This class defines constant variables internal static class GlobalVars diff --git a/AppControl Manager/Logic/Types And Definitions/HashCreator.cs b/AppControl Manager/Others/HashCreator.cs similarity index 90% rename from AppControl Manager/Logic/Types And Definitions/HashCreator.cs rename to AppControl Manager/Others/HashCreator.cs index cdbef3661..915acdd5e 100644 --- a/AppControl Manager/Logic/Types And Definitions/HashCreator.cs +++ b/AppControl Manager/Others/HashCreator.cs @@ -1,5 +1,4 @@ - -namespace AppControlManager; +namespace AppControlManager.Others; public sealed class HashCreator(string authenticodeSHA256, string authenticodeSHA1, string fileName, int siSigningScenario) { @@ -7,4 +6,4 @@ public sealed class HashCreator(string authenticodeSHA256, string authenticodeSH public string AuthenticodeSHA1 { get; set; } = authenticodeSHA1; public string FileName { get; set; } = fileName; public int SiSigningScenario { get; set; } = siSigningScenario; -} \ No newline at end of file +} diff --git a/AppControl Manager/Logging/Logger.cs b/AppControl Manager/Others/Logger.cs similarity index 98% rename from AppControl Manager/Logging/Logger.cs rename to AppControl Manager/Others/Logger.cs index baee1cd1a..7c702b0bc 100644 --- a/AppControl Manager/Logging/Logger.cs +++ b/AppControl Manager/Others/Logger.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace AppControlManager.Logging; +namespace AppControlManager.Others; internal static class Logger { diff --git a/AppControl Manager/Logic/MainWindowViewModel.cs b/AppControl Manager/Others/MainWindowViewModel.cs similarity index 98% rename from AppControl Manager/Logic/MainWindowViewModel.cs rename to AppControl Manager/Others/MainWindowViewModel.cs index efae8ab6d..71f97bcfa 100644 --- a/AppControl Manager/Logic/MainWindowViewModel.cs +++ b/AppControl Manager/Others/MainWindowViewModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel; using Microsoft.UI.Dispatching; -namespace AppControlManager; +namespace AppControlManager.Others; /// /// ViewModel for the MainWindow, responsible for managing UI properties and diff --git a/AppControl Manager/Logic/MeowOpener.cs b/AppControl Manager/Others/MeowOpener.cs similarity index 98% rename from AppControl Manager/Logic/MeowOpener.cs rename to AppControl Manager/Others/MeowOpener.cs index 7d1e3d29e..1a8a89fd4 100644 --- a/AppControl Manager/Logic/MeowOpener.cs +++ b/AppControl Manager/Others/MeowOpener.cs @@ -2,9 +2,8 @@ using System.Collections.Generic; using System.Runtime.InteropServices; using System.Xml; -using AppControlManager.Logging; -namespace AppControlManager; +namespace AppControlManager.Others; internal static partial class MeowParser { diff --git a/AppControl Manager/Logic/MoveUserModeToKernelMode.cs b/AppControl Manager/Others/MoveUserModeToKernelMode.cs similarity index 98% rename from AppControl Manager/Logic/MoveUserModeToKernelMode.cs rename to AppControl Manager/Others/MoveUserModeToKernelMode.cs index 5e69c5af1..f9443ac32 100644 --- a/AppControl Manager/Logic/MoveUserModeToKernelMode.cs +++ b/AppControl Manager/Others/MoveUserModeToKernelMode.cs @@ -1,8 +1,7 @@ using System; using System.Xml; -using AppControlManager.Logging; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class MoveUserModeToKernelMode { diff --git a/AppControl Manager/Logic/Types And Definitions/OpusSigner.cs b/AppControl Manager/Others/OpusSigner.cs similarity index 82% rename from AppControl Manager/Logic/Types And Definitions/OpusSigner.cs rename to AppControl Manager/Others/OpusSigner.cs index 5ec83739f..34b150ea6 100644 --- a/AppControl Manager/Logic/Types And Definitions/OpusSigner.cs +++ b/AppControl Manager/Others/OpusSigner.cs @@ -1,5 +1,5 @@ -namespace AppControlManager; +namespace AppControlManager.Others; public sealed class OpusSigner(string tbsHash, string subjectCN) { diff --git a/AppControl Manager/Logic/PageHashCalc.cs b/AppControl Manager/Others/PageHashCalc.cs similarity index 98% rename from AppControl Manager/Logic/PageHashCalc.cs rename to AppControl Manager/Others/PageHashCalc.cs index fb4e4c5ba..d65e5e268 100644 --- a/AppControl Manager/Logic/PageHashCalc.cs +++ b/AppControl Manager/Others/PageHashCalc.cs @@ -3,7 +3,7 @@ using System.Runtime.InteropServices; using System.Text; -namespace AppControlManager; +namespace AppControlManager.Others; /// /// necessary logics for Page hash calculation diff --git a/AppControl Manager/Logic/PolicyFileSigningStatusDetection.cs b/AppControl Manager/Others/PolicyFileSigningStatusDetection.cs similarity index 96% rename from AppControl Manager/Logic/PolicyFileSigningStatusDetection.cs rename to AppControl Manager/Others/PolicyFileSigningStatusDetection.cs index 386e3880e..ae67a85e5 100644 --- a/AppControl Manager/Logic/PolicyFileSigningStatusDetection.cs +++ b/AppControl Manager/Others/PolicyFileSigningStatusDetection.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Xml; +using AppControlManager.Main; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class PolicyFileSigningStatusDetection { diff --git a/AppControl Manager/Logic/Types And Definitions/PolicyHashObj.cs b/AppControl Manager/Others/PolicyHashObj.cs similarity index 96% rename from AppControl Manager/Logic/Types And Definitions/PolicyHashObj.cs rename to AppControl Manager/Others/PolicyHashObj.cs index 59f865cc7..0c0a2269b 100644 --- a/AppControl Manager/Logic/Types And Definitions/PolicyHashObj.cs +++ b/AppControl Manager/Others/PolicyHashObj.cs @@ -1,7 +1,7 @@ using System; // Used by AppControl Simulations -namespace AppControlManager; +namespace AppControlManager.Others; public sealed class PolicyHashObj(string hashvalue, string hashtype, string filepathforhash) { diff --git a/AppControl Manager/Logic/PolicyToCIPConverter.cs b/AppControl Manager/Others/PolicyToCIPConverter.cs similarity index 93% rename from AppControl Manager/Logic/PolicyToCIPConverter.cs rename to AppControl Manager/Others/PolicyToCIPConverter.cs index 1d7dbe55d..9c1ec65f0 100644 --- a/AppControl Manager/Logic/PolicyToCIPConverter.cs +++ b/AppControl Manager/Others/PolicyToCIPConverter.cs @@ -1,6 +1,4 @@ -using AppControlManager.Logging; - -namespace AppControlManager; +namespace AppControlManager.Others; internal static class PolicyToCIPConverter { diff --git a/AppControl Manager/Logic/ProcessStarter.cs b/AppControl Manager/Others/ProcessStarter.cs similarity index 97% rename from AppControl Manager/Logic/ProcessStarter.cs rename to AppControl Manager/Others/ProcessStarter.cs index 5a250d337..c0ba33f00 100644 --- a/AppControl Manager/Logic/ProcessStarter.cs +++ b/AppControl Manager/Others/ProcessStarter.cs @@ -1,7 +1,7 @@ using System; using System.Diagnostics; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class ProcessStarter { diff --git a/AppControl Manager/Logic/Types And Definitions/PublisherSignerCreator.cs b/AppControl Manager/Others/PublisherSignerCreator.cs similarity index 96% rename from AppControl Manager/Logic/Types And Definitions/PublisherSignerCreator.cs rename to AppControl Manager/Others/PublisherSignerCreator.cs index 49792808f..e125edc42 100644 --- a/AppControl Manager/Logic/Types And Definitions/PublisherSignerCreator.cs +++ b/AppControl Manager/Others/PublisherSignerCreator.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace AppControlManager; +namespace AppControlManager.Others; internal sealed class PublisherSignerCreator { diff --git a/AppControl Manager/Logic/RemoveSupplementalSigners.cs b/AppControl Manager/Others/RemoveSupplementalSigners.cs similarity index 98% rename from AppControl Manager/Logic/RemoveSupplementalSigners.cs rename to AppControl Manager/Others/RemoveSupplementalSigners.cs index baec5ccf5..53063d8ef 100644 --- a/AppControl Manager/Logic/RemoveSupplementalSigners.cs +++ b/AppControl Manager/Others/RemoveSupplementalSigners.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Main; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class CiPolicyHandler { diff --git a/AppControl Manager/Logic/SecHttpClient.cs b/AppControl Manager/Others/SecHttpClient.cs similarity index 92% rename from AppControl Manager/Logic/SecHttpClient.cs rename to AppControl Manager/Others/SecHttpClient.cs index cb8ef3be1..6756bc52f 100644 --- a/AppControl Manager/Logic/SecHttpClient.cs +++ b/AppControl Manager/Others/SecHttpClient.cs @@ -1,7 +1,7 @@ using System.Net; using System.Net.Http; -namespace AppControlManager.Logic; +namespace AppControlManager.Others; /// /// This class enforces minimum HTTP version of 2.0 and is future proof since it tries the highest available HTTP version by default diff --git a/AppControl Manager/Logic/SignToolHelper.cs b/AppControl Manager/Others/SignToolHelper.cs similarity index 99% rename from AppControl Manager/Logic/SignToolHelper.cs rename to AppControl Manager/Others/SignToolHelper.cs index 020c465e0..16bcba28a 100644 --- a/AppControl Manager/Logic/SignToolHelper.cs +++ b/AppControl Manager/Others/SignToolHelper.cs @@ -6,9 +6,9 @@ using System.Net.Http; using System.Runtime.InteropServices; using System.Text.Json; -using AppControlManager.Logging; +using AppControlManager.Main; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class SignToolHelper { diff --git a/AppControl Manager/Logic/Types And Definitions/SignerX.cs b/AppControl Manager/Others/SignerX.cs similarity index 91% rename from AppControl Manager/Logic/Types And Definitions/SignerX.cs rename to AppControl Manager/Others/SignerX.cs index 9a505e3b8..f57e70090 100644 --- a/AppControl Manager/Logic/Types And Definitions/SignerX.cs +++ b/AppControl Manager/Others/SignerX.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; -namespace AppControlManager; +namespace AppControlManager.Others; +// Information that's included in an App Control policy public sealed class SignerX( string id, string name, diff --git a/AppControl Manager/Logic/Types And Definitions/SimulationInput.cs b/AppControl Manager/Others/SimulationInput.cs similarity index 93% rename from AppControl Manager/Logic/Types And Definitions/SimulationInput.cs rename to AppControl Manager/Others/SimulationInput.cs index 84e5394a0..b43791afd 100644 --- a/AppControl Manager/Logic/Types And Definitions/SimulationInput.cs +++ b/AppControl Manager/Others/SimulationInput.cs @@ -1,6 +1,6 @@ using System.IO; -namespace AppControlManager; +namespace AppControlManager.Others; /// /// Used by AppControl Simulations diff --git a/AppControl Manager/Logic/Types And Definitions/SimulationOutput.cs b/AppControl Manager/Others/SimulationOutput.cs similarity index 98% rename from AppControl Manager/Logic/Types And Definitions/SimulationOutput.cs rename to AppControl Manager/Others/SimulationOutput.cs index c520323a7..9c811c59d 100644 --- a/AppControl Manager/Logic/Types And Definitions/SimulationOutput.cs +++ b/AppControl Manager/Others/SimulationOutput.cs @@ -1,5 +1,4 @@ - -namespace AppControlManager; +namespace AppControlManager.Others; /// /// Used by AppControl Simulations, the output of the comparer function/method diff --git a/AppControl Manager/Logic/SnapBackGuarantee.cs b/AppControl Manager/Others/SnapBackGuarantee.cs similarity index 99% rename from AppControl Manager/Logic/SnapBackGuarantee.cs rename to AppControl Manager/Others/SnapBackGuarantee.cs index 5e79b0a89..b89d16697 100644 --- a/AppControl Manager/Logic/SnapBackGuarantee.cs +++ b/AppControl Manager/Others/SnapBackGuarantee.cs @@ -1,9 +1,8 @@ using System; using System.IO; using System.Management; -using AppControlManager.Logging; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class SnapBackGuarantee { diff --git a/AppControl Manager/Logic/StagingArea.cs b/AppControl Manager/Others/StagingArea.cs similarity index 96% rename from AppControl Manager/Logic/StagingArea.cs rename to AppControl Manager/Others/StagingArea.cs index 3cc2dada8..af4666f9a 100644 --- a/AppControl Manager/Logic/StagingArea.cs +++ b/AppControl Manager/Others/StagingArea.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class StagingArea { diff --git a/AppControl Manager/Logic/SupplementalForSelf.cs b/AppControl Manager/Others/SupplementalForSelf.cs similarity index 99% rename from AppControl Manager/Logic/SupplementalForSelf.cs rename to AppControl Manager/Others/SupplementalForSelf.cs index 8cdcfb58b..4283bc07b 100644 --- a/AppControl Manager/Logic/SupplementalForSelf.cs +++ b/AppControl Manager/Others/SupplementalForSelf.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using AppControlManager.Logging; +using AppControlManager.Main; using AppControlManager.SiPolicyIntel; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class SupplementalForSelf { diff --git a/AppControl Manager/Logic/TaskSchedulerHelper.cs b/AppControl Manager/Others/TaskSchedulerHelper.cs similarity index 97% rename from AppControl Manager/Logic/TaskSchedulerHelper.cs rename to AppControl Manager/Others/TaskSchedulerHelper.cs index 6a4541dac..cebda1414 100644 --- a/AppControl Manager/Logic/TaskSchedulerHelper.cs +++ b/AppControl Manager/Others/TaskSchedulerHelper.cs @@ -1,9 +1,8 @@ using System; using System.Linq; using System.Management; -using AppControlManager.Logging; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class TaskSchedulerHelper { diff --git a/AppControl Manager/Logic/Types And Definitions/UpdateCheckResponse.cs b/AppControl Manager/Others/UpdateCheckResponse.cs similarity index 91% rename from AppControl Manager/Logic/Types And Definitions/UpdateCheckResponse.cs rename to AppControl Manager/Others/UpdateCheckResponse.cs index f10d792c7..e93d3e27e 100644 --- a/AppControl Manager/Logic/Types And Definitions/UpdateCheckResponse.cs +++ b/AppControl Manager/Others/UpdateCheckResponse.cs @@ -1,6 +1,6 @@ using System; -namespace AppControlManager; +namespace AppControlManager.Others; /// /// Represents an object that is the response of an update check for the AppControl Manager app diff --git a/AppControl Manager/Logic/Win32Interop.cs b/AppControl Manager/Others/Win32Interop.cs similarity index 97% rename from AppControl Manager/Logic/Win32Interop.cs rename to AppControl Manager/Others/Win32Interop.cs index 0f406b2a7..b6af20328 100644 --- a/AppControl Manager/Logic/Win32Interop.cs +++ b/AppControl Manager/Others/Win32Interop.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.InteropServices; -namespace AppControlManager; +namespace AppControlManager.Others; internal sealed partial class Win32InteropInternal { diff --git a/AppControl Manager/Logic/Types And Definitions/WinTrust.cs b/AppControl Manager/Others/WinTrust.cs similarity index 100% rename from AppControl Manager/Logic/Types And Definitions/WinTrust.cs rename to AppControl Manager/Others/WinTrust.cs diff --git a/AppControl Manager/Logic/WldpQuerySecurityPolicy.cs b/AppControl Manager/Others/WldpQuerySecurityPolicy.cs similarity index 96% rename from AppControl Manager/Logic/WldpQuerySecurityPolicy.cs rename to AppControl Manager/Others/WldpQuerySecurityPolicy.cs index 8753e0c50..cbbb97000 100644 --- a/AppControl Manager/Logic/WldpQuerySecurityPolicy.cs +++ b/AppControl Manager/Others/WldpQuerySecurityPolicy.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.InteropServices; -namespace AppControlManager; +namespace AppControlManager.Others; internal enum WLDP_SECURE_SETTING_VALUE_TYPE { @@ -40,4 +40,4 @@ internal static UNICODE_STRING InitUnicodeString(string s) us.Buffer = Marshal.StringToHGlobalUni(s); return us; } -} \ No newline at end of file +} diff --git a/AppControl Manager/Logic/XmlFilePathExtractor.cs b/AppControl Manager/Others/XmlFilePathExtractor.cs similarity index 96% rename from AppControl Manager/Logic/XmlFilePathExtractor.cs rename to AppControl Manager/Others/XmlFilePathExtractor.cs index 52ac828e7..8351122e6 100644 --- a/AppControl Manager/Logic/XmlFilePathExtractor.cs +++ b/AppControl Manager/Others/XmlFilePathExtractor.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Xml; -namespace AppControlManager; +namespace AppControlManager.Others; internal static class XmlFilePathExtractor { diff --git a/AppControl Manager/Logic/packageManagement.cs b/AppControl Manager/Others/packageManagement.cs similarity index 87% rename from AppControl Manager/Logic/packageManagement.cs rename to AppControl Manager/Others/packageManagement.cs index b5ca661b3..9b73b9769 100644 --- a/AppControl Manager/Logic/packageManagement.cs +++ b/AppControl Manager/Others/packageManagement.cs @@ -2,19 +2,7 @@ using System.Collections.Generic; using Windows.ApplicationModel; -/* Removes all the packages that match a name and publisher - - var packageManager = new Windows.Management.Deployment.PackageManager(); - IEnumerable packages = packageManager.FindPackages("AppControlManager", "CN=SelfSignedCertForAppControlManager"); - - foreach (Package package in packages) - { - packageManager.RemovePackageAsync(package.Id.FullName); - - } -*/ - -namespace AppControlManager; +namespace AppControlManager.Others; public class PackageDetails { diff --git a/AppControl Manager/Pages/AllowNewApps/AllowNewAppsStart.xaml.cs b/AppControl Manager/Pages/AllowNewApps/AllowNewAppsStart.xaml.cs index 4c47140b2..a6f967c42 100644 --- a/AppControl Manager/Pages/AllowNewApps/AllowNewAppsStart.xaml.cs +++ b/AppControl Manager/Pages/AllowNewApps/AllowNewAppsStart.xaml.cs @@ -7,7 +7,8 @@ using System.Threading.Tasks; using AppControlManager.CustomUIElements; using AppControlManager.IntelGathering; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; using AppControlManager.SiPolicy; using AppControlManager.SiPolicyIntel; using AppControlManager.XMLOps; @@ -17,6 +18,7 @@ using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml.Navigation; + namespace AppControlManager.Pages; public sealed partial class AllowNewAppsStart : Page, Sidebar.IAnimatedIconsManager diff --git a/AppControl Manager/Pages/BuildNewCertificate.xaml.cs b/AppControl Manager/Pages/BuildNewCertificate.xaml.cs index fe50d8237..f8001b140 100644 --- a/AppControl Manager/Pages/BuildNewCertificate.xaml.cs +++ b/AppControl Manager/Pages/BuildNewCertificate.xaml.cs @@ -1,5 +1,6 @@ using System.Security.Cryptography.X509Certificates; using System.Threading.Tasks; +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; @@ -7,7 +8,6 @@ namespace AppControlManager.Pages; - public sealed partial class BuildNewCertificate : Page { diff --git a/AppControl Manager/Pages/ConfigurePolicyRuleOptions.xaml.cs b/AppControl Manager/Pages/ConfigurePolicyRuleOptions.xaml.cs index 21536995d..4a1a9a98e 100644 --- a/AppControl Manager/Pages/ConfigurePolicyRuleOptions.xaml.cs +++ b/AppControl Manager/Pages/ConfigurePolicyRuleOptions.xaml.cs @@ -1,11 +1,12 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using AppControlManager.Others; using CommunityToolkit.WinUI.Controls; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; -using static AppControlManager.CiRuleOptions; +using static AppControlManager.Main.CiRuleOptions; namespace AppControlManager.Pages; diff --git a/AppControl Manager/Pages/CreateDenyPolicy.xaml.cs b/AppControl Manager/Pages/CreateDenyPolicy.xaml.cs index 41640c67d..d765dea53 100644 --- a/AppControl Manager/Pages/CreateDenyPolicy.xaml.cs +++ b/AppControl Manager/Pages/CreateDenyPolicy.xaml.cs @@ -5,7 +5,8 @@ using System.Linq; using System.Threading.Tasks; using AppControlManager.IntelGathering; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; using AppControlManager.XMLOps; using CommunityToolkit.WinUI.Controls; using Microsoft.UI.Xaml; diff --git a/AppControl Manager/Pages/CreatePolicy.xaml.cs b/AppControl Manager/Pages/CreatePolicy.xaml.cs index b2848348c..47f25ceac 100644 --- a/AppControl Manager/Pages/CreatePolicy.xaml.cs +++ b/AppControl Manager/Pages/CreatePolicy.xaml.cs @@ -1,5 +1,7 @@ using System; using System.Threading.Tasks; +using AppControlManager.Main; +using AppControlManager.Others; using CommunityToolkit.WinUI.Controls; using Microsoft.UI; using Microsoft.UI.Text; diff --git a/AppControl Manager/Pages/CreateSupplementalPolicy.xaml.cs b/AppControl Manager/Pages/CreateSupplementalPolicy.xaml.cs index 27c3ee22e..dcb8846f5 100644 --- a/AppControl Manager/Pages/CreateSupplementalPolicy.xaml.cs +++ b/AppControl Manager/Pages/CreateSupplementalPolicy.xaml.cs @@ -6,7 +6,8 @@ using System.Security.Cryptography.X509Certificates; using System.Threading.Tasks; using AppControlManager.IntelGathering; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; using AppControlManager.SiPolicy; using AppControlManager.XMLOps; using CommunityToolkit.WinUI.Controls; diff --git a/AppControl Manager/Pages/Deployment.xaml.cs b/AppControl Manager/Pages/Deployment.xaml.cs index 21101fcd0..6581dbb3b 100644 --- a/AppControl Manager/Pages/Deployment.xaml.cs +++ b/AppControl Manager/Pages/Deployment.xaml.cs @@ -4,7 +4,8 @@ using System.Linq; using System.Threading.Tasks; using AppControlManager.CustomUIElements; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; using AppControlManager.SiPolicy; using AppControlManager.SiPolicyIntel; using AppControlManager.XMLOps; diff --git a/AppControl Manager/Pages/EventLogsPolicyCreation.xaml.cs b/AppControl Manager/Pages/EventLogsPolicyCreation.xaml.cs index a72eda02c..f1c57ec13 100644 --- a/AppControl Manager/Pages/EventLogsPolicyCreation.xaml.cs +++ b/AppControl Manager/Pages/EventLogsPolicyCreation.xaml.cs @@ -6,7 +6,8 @@ using System.Text; using System.Threading.Tasks; using AppControlManager.IntelGathering; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; using AppControlManager.XMLOps; using CommunityToolkit.WinUI.UI.Controls; using Microsoft.UI.Xaml; diff --git a/AppControl Manager/Pages/GetCIHashes.xaml.cs b/AppControl Manager/Pages/GetCIHashes.xaml.cs index ee01c9d31..d4d7b4fed 100644 --- a/AppControl Manager/Pages/GetCIHashes.xaml.cs +++ b/AppControl Manager/Pages/GetCIHashes.xaml.cs @@ -2,6 +2,8 @@ using System.IO; using System.Security.Cryptography; using System.Threading.Tasks; +using AppControlManager.Main; +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; diff --git a/AppControl Manager/Pages/GetSecurePolicySettings.xaml.cs b/AppControl Manager/Pages/GetSecurePolicySettings.xaml.cs index 5ab6f7582..86ee78f96 100644 --- a/AppControl Manager/Pages/GetSecurePolicySettings.xaml.cs +++ b/AppControl Manager/Pages/GetSecurePolicySettings.xaml.cs @@ -1,4 +1,5 @@ using System.Globalization; +using AppControlManager.Main; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; diff --git a/AppControl Manager/Pages/Logs.xaml.cs b/AppControl Manager/Pages/Logs.xaml.cs index 6831b67a5..3bccaa6a0 100644 --- a/AppControl Manager/Pages/Logs.xaml.cs +++ b/AppControl Manager/Pages/Logs.xaml.cs @@ -2,7 +2,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; -using AppControlManager.Logging; +using AppControlManager.Others; using Microsoft.UI; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; diff --git a/AppControl Manager/Pages/MDEAHPolicyCreation.xaml.cs b/AppControl Manager/Pages/MDEAHPolicyCreation.xaml.cs index 549ecca04..e7ab6f1f5 100644 --- a/AppControl Manager/Pages/MDEAHPolicyCreation.xaml.cs +++ b/AppControl Manager/Pages/MDEAHPolicyCreation.xaml.cs @@ -6,7 +6,8 @@ using System.Text; using System.Threading.Tasks; using AppControlManager.IntelGathering; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; using AppControlManager.XMLOps; using CommunityToolkit.WinUI.UI.Controls; using Microsoft.UI.Xaml; diff --git a/AppControl Manager/Pages/MergePolicies.xaml.cs b/AppControl Manager/Pages/MergePolicies.xaml.cs index 9951103e2..08f0627a0 100644 --- a/AppControl Manager/Pages/MergePolicies.xaml.cs +++ b/AppControl Manager/Pages/MergePolicies.xaml.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Controls.Primitives; diff --git a/AppControl Manager/Pages/Settings.xaml.cs b/AppControl Manager/Pages/Settings.xaml.cs index 68150ec30..e92b69769 100644 --- a/AppControl Manager/Pages/Settings.xaml.cs +++ b/AppControl Manager/Pages/Settings.xaml.cs @@ -3,13 +3,15 @@ using System.Globalization; using System.Linq; using System.Threading.Tasks; -using AppControlManager.Logging; +using AppControlManager.AppSettings; +using AppControlManager.IntelGathering; +using AppControlManager.Main; +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; using Windows.UI.ViewManagement; -using static AppControlManager.AppSettings; - +using static AppControlManager.AppSettings.AppSettingsCls; namespace AppControlManager.Pages; diff --git a/AppControl Manager/Pages/Simulation.xaml.cs b/AppControl Manager/Pages/Simulation.xaml.cs index 8f882155c..679621735 100644 --- a/AppControl Manager/Pages/Simulation.xaml.cs +++ b/AppControl Manager/Pages/Simulation.xaml.cs @@ -6,6 +6,8 @@ using System.Linq; using System.Text; using System.Threading.Tasks; +using AppControlManager.Main; +using AppControlManager.Others; using CommunityToolkit.WinUI.Controls; using CommunityToolkit.WinUI.UI.Controls; using Microsoft.UI.Xaml; diff --git a/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml.cs b/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml.cs index 4d67218a5..f12ef70a9 100644 --- a/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml.cs +++ b/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml.cs @@ -1,3 +1,4 @@ +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; diff --git a/AppControl Manager/Pages/SystemInformation/ViewCurrentPolicies.xaml.cs b/AppControl Manager/Pages/SystemInformation/ViewCurrentPolicies.xaml.cs index c7f1c5faa..2e08b3d1d 100644 --- a/AppControl Manager/Pages/SystemInformation/ViewCurrentPolicies.xaml.cs +++ b/AppControl Manager/Pages/SystemInformation/ViewCurrentPolicies.xaml.cs @@ -6,7 +6,8 @@ using System.Text; using System.Threading.Tasks; using AppControlManager.CustomUIElements; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; using AppControlManager.SiPolicyIntel; using CommunityToolkit.WinUI.UI.Controls; using Microsoft.UI; @@ -19,7 +20,6 @@ namespace AppControlManager.Pages; - public sealed partial class ViewCurrentPolicies : Page { // To store the policies displayed on the DataGrid diff --git a/AppControl Manager/Pages/Update.xaml.cs b/AppControl Manager/Pages/Update.xaml.cs index 398fdd359..da9faf31d 100644 --- a/AppControl Manager/Pages/Update.xaml.cs +++ b/AppControl Manager/Pages/Update.xaml.cs @@ -9,8 +9,9 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; -using AppControlManager.Logging; -using AppControlManager.Logic; +using AppControlManager.AppSettings; +using AppControlManager.Main; +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; @@ -416,7 +417,7 @@ await Task.Run(() => /// private void AutoUpdateCheckToggle_Toggled(object sender, RoutedEventArgs e) { - AppSettings.SaveSetting(AppSettings.SettingKeys.AutoCheckForUpdateAtStartup, AutoUpdateCheckToggle.IsOn); + AppSettingsCls.SaveSetting(AppSettingsCls.SettingKeys.AutoCheckForUpdateAtStartup, AutoUpdateCheckToggle.IsOn); } @@ -432,7 +433,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e) base.OnNavigatedTo(e); // Set the toggle for Auto Update Check based on app settings - AutoUpdateCheckToggle.IsOn = AppSettings.TryGetSetting(AppSettings.SettingKeys.AutoCheckForUpdateAtStartup) ?? true; + AutoUpdateCheckToggle.IsOn = AppSettingsCls.TryGetSetting(AppSettingsCls.SettingKeys.AutoCheckForUpdateAtStartup) ?? true; // Grab the latest text for the CheckForUpdateButton button CheckForUpdateButton.Content = GlobalVars.updateButtonTextOnTheUpdatePage; @@ -459,7 +460,7 @@ private void AutoUpdateCheckToggleSettingsCard_Click(object sender, RoutedEventA { AutoUpdateCheckToggle.IsOn = !AutoUpdateCheckToggle.IsOn; - AppSettings.SaveSetting(AppSettings.SettingKeys.AutoCheckForUpdateAtStartup, AutoUpdateCheckToggle.IsOn); + AppSettingsCls.SaveSetting(AppSettingsCls.SettingKeys.AutoCheckForUpdateAtStartup, AutoUpdateCheckToggle.IsOn); } diff --git a/AppControl Manager/Pages/UpdatePageCustomMSIXPath.xaml.cs b/AppControl Manager/Pages/UpdatePageCustomMSIXPath.xaml.cs index 602195843..82fd1cb13 100644 --- a/AppControl Manager/Pages/UpdatePageCustomMSIXPath.xaml.cs +++ b/AppControl Manager/Pages/UpdatePageCustomMSIXPath.xaml.cs @@ -1,4 +1,5 @@ using System.IO; +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; diff --git a/AppControl Manager/Pages/ValidatePolicy.xaml.cs b/AppControl Manager/Pages/ValidatePolicy.xaml.cs index 3d6597ee1..f1fd98c2c 100644 --- a/AppControl Manager/Pages/ValidatePolicy.xaml.cs +++ b/AppControl Manager/Pages/ValidatePolicy.xaml.cs @@ -1,5 +1,7 @@ using System; using System.Threading.Tasks; +using AppControlManager.Main; +using AppControlManager.Others; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; diff --git a/AppControl Manager/Pages/ViewFileCertificates.xaml.cs b/AppControl Manager/Pages/ViewFileCertificates.xaml.cs index 18d007eaa..fc0956f47 100644 --- a/AppControl Manager/Pages/ViewFileCertificates.xaml.cs +++ b/AppControl Manager/Pages/ViewFileCertificates.xaml.cs @@ -7,6 +7,8 @@ using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; +using AppControlManager.Others; +using AppControlManager.SimulationMethods; using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Controls; using Microsoft.UI.Xaml.Navigation; diff --git a/AppControl Manager/SiPolicy/Management.cs b/AppControl Manager/SiPolicy/Management.cs index a14b0dc7f..2478f8792 100644 --- a/AppControl Manager/SiPolicy/Management.cs +++ b/AppControl Manager/SiPolicy/Management.cs @@ -1,6 +1,7 @@ using System; using System.Xml; using System.Xml.Serialization; +using AppControlManager.Main; namespace AppControlManager.SiPolicy; diff --git a/AppControl Manager/SiPolicy/Merger.Aggregate.cs b/AppControl Manager/SiPolicy/Merger.Aggregate.cs index 96a2d2a27..d01d89492 100644 --- a/AppControl Manager/SiPolicy/Merger.Aggregate.cs +++ b/AppControl Manager/SiPolicy/Merger.Aggregate.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.Linq; -using AppControlManager.Logging; +using AppControlManager.Others; using AppControlManager.SiPolicyIntel; namespace AppControlManager.SiPolicy; diff --git a/AppControl Manager/SiPolicyIntel/AddSigningDetails.cs b/AppControl Manager/SiPolicyIntel/AddSigningDetails.cs index dce2d3525..f6c7000b3 100644 --- a/AppControl Manager/SiPolicyIntel/AddSigningDetails.cs +++ b/AppControl Manager/SiPolicyIntel/AddSigningDetails.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Security.Cryptography.X509Certificates; +using AppControlManager.Others; using AppControlManager.SiPolicy; namespace AppControlManager.SiPolicyIntel; diff --git a/AppControl Manager/Logic/App Control Simulation/Arbitrator.cs b/AppControl Manager/SimulationMethods/Arbitrator.cs similarity index 99% rename from AppControl Manager/Logic/App Control Simulation/Arbitrator.cs rename to AppControl Manager/SimulationMethods/Arbitrator.cs index 55c567b7c..6036ef671 100644 --- a/AppControl Manager/Logic/App Control Simulation/Arbitrator.cs +++ b/AppControl Manager/SimulationMethods/Arbitrator.cs @@ -5,9 +5,9 @@ using System.Linq; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; -using AppControlManager.Logging; +using AppControlManager.Others; -namespace AppControlManager; +namespace AppControlManager.SimulationMethods; internal static class Arbitrator { diff --git a/AppControl Manager/Logic/App Control Simulation/GetCertificateDetails.cs b/AppControl Manager/SimulationMethods/GetCertificateDetails.cs similarity index 99% rename from AppControl Manager/Logic/App Control Simulation/GetCertificateDetails.cs rename to AppControl Manager/SimulationMethods/GetCertificateDetails.cs index 071db6cad..3047cc010 100644 --- a/AppControl Manager/Logic/App Control Simulation/GetCertificateDetails.cs +++ b/AppControl Manager/SimulationMethods/GetCertificateDetails.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Security.Cryptography.Pkcs; using System.Security.Cryptography.X509Certificates; +using AppControlManager.Others; -namespace AppControlManager; +namespace AppControlManager.SimulationMethods; internal static class GetCertificateDetails { diff --git a/AppControl Manager/Logic/App Control Simulation/GetFileRuleOutput.cs b/AppControl Manager/SimulationMethods/GetFileRuleOutput.cs similarity index 97% rename from AppControl Manager/Logic/App Control Simulation/GetFileRuleOutput.cs rename to AppControl Manager/SimulationMethods/GetFileRuleOutput.cs index 4b0eb18ed..808393cc0 100644 --- a/AppControl Manager/Logic/App Control Simulation/GetFileRuleOutput.cs +++ b/AppControl Manager/SimulationMethods/GetFileRuleOutput.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text.RegularExpressions; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Others; -namespace AppControlManager; +namespace AppControlManager.SimulationMethods; internal static partial class GetFileRuleOutput { diff --git a/AppControl Manager/Logic/App Control Simulation/GetSignerInfo.cs b/AppControl Manager/SimulationMethods/GetSignerInfo.cs similarity index 99% rename from AppControl Manager/Logic/App Control Simulation/GetSignerInfo.cs rename to AppControl Manager/SimulationMethods/GetSignerInfo.cs index 03a810433..a4eeccccd 100644 --- a/AppControl Manager/Logic/App Control Simulation/GetSignerInfo.cs +++ b/AppControl Manager/SimulationMethods/GetSignerInfo.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Xml; +using AppControlManager.Others; -namespace AppControlManager; +namespace AppControlManager.SimulationMethods; internal static class GetSignerInfo { diff --git a/AppControl Manager/XMLOps/ClearCiPolicySemantic.cs b/AppControl Manager/XMLOps/ClearCiPolicySemantic.cs index a326ac7cb..c2a89480d 100644 --- a/AppControl Manager/XMLOps/ClearCiPolicySemantic.cs +++ b/AppControl Manager/XMLOps/ClearCiPolicySemantic.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Xml; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/EditGUIDs.cs b/AppControl Manager/XMLOps/EditGUIDs.cs index bc614fb97..b29300242 100644 --- a/AppControl Manager/XMLOps/EditGUIDs.cs +++ b/AppControl Manager/XMLOps/EditGUIDs.cs @@ -1,4 +1,5 @@ using System.IO; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/Macros.cs b/AppControl Manager/XMLOps/Macros.cs index 0fd7f4507..b7fcf17ea 100644 --- a/AppControl Manager/XMLOps/Macros.cs +++ b/AppControl Manager/XMLOps/Macros.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/Master.cs b/AppControl Manager/XMLOps/Master.cs index aa0d162f0..89525e605 100644 --- a/AppControl Manager/XMLOps/Master.cs +++ b/AppControl Manager/XMLOps/Master.cs @@ -1,6 +1,6 @@ using System; using System.IO; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/NewCertificateSignerRules.cs b/AppControl Manager/XMLOps/NewCertificateSignerRules.cs index 972901b06..fe73182d5 100644 --- a/AppControl Manager/XMLOps/NewCertificateSignerRules.cs +++ b/AppControl Manager/XMLOps/NewCertificateSignerRules.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Xml; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/NewFilePublisherLevelRules.cs b/AppControl Manager/XMLOps/NewFilePublisherLevelRules.cs index 2a846dd89..33a074277 100644 --- a/AppControl Manager/XMLOps/NewFilePublisherLevelRules.cs +++ b/AppControl Manager/XMLOps/NewFilePublisherLevelRules.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/NewHashLevelRules.cs b/AppControl Manager/XMLOps/NewHashLevelRules.cs index 21a337d03..e9fc33405 100644 --- a/AppControl Manager/XMLOps/NewHashLevelRules.cs +++ b/AppControl Manager/XMLOps/NewHashLevelRules.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/NewPFNLevelRules.cs b/AppControl Manager/XMLOps/NewPFNLevelRules.cs index 4427258bc..59b9e6205 100644 --- a/AppControl Manager/XMLOps/NewPFNLevelRules.cs +++ b/AppControl Manager/XMLOps/NewPFNLevelRules.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Xml; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/NewPublisherLevelRules.cs b/AppControl Manager/XMLOps/NewPublisherLevelRules.cs index e0a997a41..0fe54840b 100644 --- a/AppControl Manager/XMLOps/NewPublisherLevelRules.cs +++ b/AppControl Manager/XMLOps/NewPublisherLevelRules.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/SetCiPolicyInfo.cs b/AppControl Manager/XMLOps/SetCiPolicyInfo.cs index 63b807f38..9efa6013e 100644 --- a/AppControl Manager/XMLOps/SetCiPolicyInfo.cs +++ b/AppControl Manager/XMLOps/SetCiPolicyInfo.cs @@ -1,6 +1,7 @@ using System; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/SignerAndHashBuilder.cs b/AppControl Manager/XMLOps/SignerAndHashBuilder.cs index 99d7bd994..8ee764e2f 100644 --- a/AppControl Manager/XMLOps/SignerAndHashBuilder.cs +++ b/AppControl Manager/XMLOps/SignerAndHashBuilder.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using AppControlManager.IntelGathering; -using AppControlManager.Logging; +using AppControlManager.Others; namespace AppControlManager.XMLOps; diff --git a/AppControl Manager/XMLOps/UpdateHvciOptions.cs b/AppControl Manager/XMLOps/UpdateHvciOptions.cs index cbed3e6a5..27b55f362 100644 --- a/AppControl Manager/XMLOps/UpdateHvciOptions.cs +++ b/AppControl Manager/XMLOps/UpdateHvciOptions.cs @@ -1,6 +1,7 @@ using System; using System.Xml; -using AppControlManager.Logging; +using AppControlManager.Main; +using AppControlManager.Others; namespace AppControlManager.XMLOps;