[fxcop] Settings UI library (part 4) - project/namespace renames (#7403)

* Rename Interface to Interfaces in namespaces

* Rename Lib to Library in namespaces

* Rename project and directory and enable fxcop

* Add CA2213 suppression

* Minor fixes
This commit is contained in:
Luthfi Mawarid
2020-10-22 09:45:48 -07:00
committed by GitHub
parent aa0947061a
commit f92bd6ffd3
135 changed files with 255 additions and 247 deletions

View File

@@ -229,7 +229,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
src\tests\win-app-driver\packages.config = src\tests\win-app-driver\packages.config
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerToys.Settings.UI.Lib", "src\core\Microsoft.PowerToys.Settings.UI.Lib\Microsoft.PowerToys.Settings.UI.Lib.csproj", "{B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.PowerToys.Settings.UI.Library", "src\core\Microsoft.PowerToys.Settings.UI.Library\Microsoft.PowerToys.Settings.UI.Library.csproj", "{B1BCC8C6-46B5-4BFA-8F22-20F32D99EC6A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "interop", "src\common\interop\interop.vcxproj", "{F055103B-F80B-4D0C-BF48-057C55620033}"
EndProject

View File

@@ -1,5 +1,5 @@
using ColorPicker.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Drawing;

View File

@@ -28,7 +28,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\core\Microsoft.PowerToys.Settings.UI.Lib\Microsoft.PowerToys.Settings.UI.Lib.csproj" />
<ProjectReference Include="..\src\core\Microsoft.PowerToys.Settings.UI.Library\Microsoft.PowerToys.Settings.UI.Library.csproj" />
<ProjectReference Include="..\src\modules\colorPicker\ColorPickerUI\ColorPickerUI.csproj" />
</ItemGroup>

View File

@@ -6,7 +6,7 @@ using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class AppSpecificKeysDataModel : KeysDataModel
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public abstract class BasePTModuleSettings
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class BoolProperty
{

View File

@@ -6,7 +6,7 @@ using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class BoolPropertyJsonConverter : JsonConverter<bool>
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public enum ColorRepresentationType
{

View File

@@ -5,9 +5,9 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ColorPickerSettings : BasePTModuleSettings, ISettingsConfig
{

View File

@@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public static class ConfigDefaults
{

View File

@@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib.CustomAction
namespace Microsoft.PowerToys.Settings.UI.Library.CustomAction
{
public class CustomActionDataModel
{

View File

@@ -5,7 +5,7 @@
using System;
using System.Text.Json;
namespace Microsoft.PowerToys.Settings.UI.Lib.CustomAction
namespace Microsoft.PowerToys.Settings.UI.Library.CustomAction
{
public class CustomNamePolicy : JsonNamingPolicy
{

View File

@@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.PowerToys.Settings.UI.Lib.CustomAction
namespace Microsoft.PowerToys.Settings.UI.Library.CustomAction
{
public class ModuleCustomAction
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib.CustomAction
namespace Microsoft.PowerToys.Settings.UI.Library.CustomAction
{
public class SendCustomAction
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
// Represents the configuration property of the settings that store Double type.
public class DoubleProperty

View File

@@ -8,7 +8,7 @@ using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.Telemetry;
using Microsoft.PowerToys.Telemetry;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class EnabledModules
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class FZConfigProperties
{

View File

@@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class FancyZonesSettings : BasePTModuleSettings, ISettingsConfig
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class FancyZonesSettingsIPCMessage
{

View File

@@ -6,10 +6,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class GeneralSettings : ISettingsConfig
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class GeneralSettingsCustomAction
{

View File

@@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class GenericProperty<T>
{

View File

@@ -5,7 +5,7 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Microsoft.PowerToys.Settings.UI.Lib.Helpers
namespace Microsoft.PowerToys.Settings.UI.Library.Helpers
{
public class Observable : INotifyPropertyChanged
{

View File

@@ -4,9 +4,9 @@
using System.Text;
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class HotkeySettings
{

View File

@@ -3,9 +3,10 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Diagnostics.CodeAnalysis;
using interop;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public delegate void KeyEvent(int key);
@@ -20,6 +21,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
private const int WmSysKeyDown = 0x0104;
private const int WmSysKeyUp = 0x0105;
[SuppressMessage("Usage", "CA2213:Disposable fields should be disposed", Justification = "This class conforms to the IDisposable pattern, and the Dispose and C++ destructor does get called when debugging. Looks like a false positive from FxCop.")]
private KeyboardHook _hook;
private KeyEvent _keyDown;
private KeyEvent _keyUp;

View File

@@ -2,9 +2,9 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public interface ISettingsUtils
{

View File

@@ -6,7 +6,7 @@ using System.Collections.ObjectModel;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ImageResizerProperties
{

View File

@@ -4,9 +4,9 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ImageResizerSettings : BasePTModuleSettings, ISettingsConfig
{

View File

@@ -8,7 +8,7 @@ using System.Runtime.CompilerServices;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ImageSize : INotifyPropertyChanged
{

View File

@@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ImagerResizerKeepDateModified
{

View File

@@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ImageResizerCustomSizeProperty
{

View File

@@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ImageResizerFallbackEncoder
{

View File

@@ -6,7 +6,7 @@ using System.Collections.ObjectModel;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ImageResizerSizes
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
// Represents the configuration property of the settings that store Integer type.
public class IntProperty

View File

@@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.PowerToys.Settings.UI.Lib.Interface
namespace Microsoft.PowerToys.Settings.UI.Library.Interfaces
{
// Common interface to be implemented by all the objects which get and store settings properties.
public interface ISettingsConfig

View File

@@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.PowerToys.Settings.UI.Lib.Interface
namespace Microsoft.PowerToys.Settings.UI.Library.Interfaces
{
public interface ISettingsRepository<T>
{

View File

@@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class KeyboardKeysProperty
{

View File

@@ -4,9 +4,9 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class KeyboardManagerProfile : ISettingsConfig
{

View File

@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class KeyboardManagerProperties
{

View File

@@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class KeyboardManagerSettings : BasePTModuleSettings, ISettingsConfig
{

View File

@@ -6,9 +6,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class KeysDataModel
{

View File

@@ -8,13 +8,14 @@
<Version>$(Version).0</Version>
<Authors>Microsoft Corporation</Authors>
<Product>PowerToys</Product>
<Description>PowerToys Settings UI Lib</Description>
<Description>PowerToys Settings UI Library</Description>
<Copyright>Copyright (C) 2020 Microsoft Corporation</Copyright>
<RepositoryUrl>https://github.com/microsoft/PowerToys</RepositoryUrl>
<RepositoryType>Github</RepositoryType>
<PackageTags>PowerToys</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AssemblyName>Microsoft.PowerToys.Settings.UI.Lib</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@@ -41,6 +42,11 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="4.7.2" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers">
<Version>3.3.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class OutGoingGeneralSettings
{

View File

@@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class PowerLauncherProperties
{

View File

@@ -5,9 +5,9 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class PowerLauncherSettings : BasePTModuleSettings, ISettingsConfig
{

View File

@@ -8,7 +8,7 @@ using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.Telemetry;
using Microsoft.PowerToys.Telemetry;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class PowerPreviewProperties
{

View File

@@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class PowerPreviewSettings : BasePTModuleSettings, ISettingsConfig
{

View File

@@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.
using System.Text.Json;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class PowerRenameLocalProperties : ISettingsConfig
{

View File

@@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class PowerRenameProperties
{

View File

@@ -4,9 +4,9 @@
using System;
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class PowerRenameSettings : BasePTModuleSettings, ISettingsConfig
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class PowerRenameSettingsIPCMessage
{

View File

@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class RemapKeysDataModel
{

View File

@@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.
using System;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
// This Singleton class is a wrapper around the settings configurations that are accessed by viewmodels.
// This class can have only one instance and therefore the settings configurations are common to all.

View File

@@ -6,10 +6,10 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Text.Json;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class SettingsUtils : ISettingsUtils
{
@@ -123,7 +123,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
#if DEBUG
if (e is ArgumentException || e is ArgumentNullException || e is PathTooLongException)
{
throw e;
throw;
}
#endif
}

View File

@@ -4,7 +4,7 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ShortcutGuideProperties
{

View File

@@ -3,9 +3,9 @@
// See the LICENSE file in the project root for more information.
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ShortcutGuideSettings : BasePTModuleSettings, ISettingsConfig
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ShortcutGuideSettingsIPCMessage
{

View File

@@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class ShortcutsKeyDataModel
{

View File

@@ -4,7 +4,7 @@
using System.Text.Json;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class SndFancyZonesSettings
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class SndImageResizerSettings
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class SndKeyboardManagerSettings
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
// Represents a powertoys module settings setnt to the runner.
public class SndModuleSettings<T>

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class SndPowerPreviewSettings
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class SndPowerRenameSettings
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class SndShortcutGuideSettings
{

View File

@@ -5,7 +5,7 @@
using System.Text.Json;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Lib
namespace Microsoft.PowerToys.Settings.UI.Library
{
// Represents the configuration property of the settings that store string type.
public class StringProperty

View File

@@ -7,9 +7,9 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.PowerToys.Settings.UI.Lib.CustomAction;
using Microsoft.PowerToys.Settings.UI.Library.CustomAction;
namespace Microsoft.PowerToys.Settings.UI.Lib.Utilities
namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
{
public static class Helper
{

View File

@@ -2,7 +2,7 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace Microsoft.PowerToys.Settings.UI.Lib.Utilities
namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
{
public interface IIOProvider
{

View File

@@ -7,7 +7,7 @@ using System.Diagnostics;
using System.Globalization;
using System.IO;
namespace Microsoft.PowerToys.Settings.UI.Lib.Utilities
namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
{
public static class Logger
{

View File

@@ -7,7 +7,7 @@ using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace Microsoft.PowerToys.Settings.UI.Lib.Utilities
namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
{
internal static class NativeMethods
{

View File

@@ -4,7 +4,7 @@
using System.IO;
namespace Microsoft.PowerToys.Settings.UI.Lib.Utilities
namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
{
public class SystemIOProvider : IIOProvider
{

View File

@@ -5,10 +5,10 @@
using System;
using System.Globalization;
using System.Text.Json;
using Microsoft.PowerToys.Settings.UI.Lib.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class ColorPickerViewModel : Observable
{

View File

@@ -5,7 +5,7 @@
using System;
using System.Windows.Input;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels.Commands
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands
{
public class ButtonClickCommand : ICommand
{

View File

@@ -5,7 +5,7 @@
using System;
using System.Windows.Input;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels.Commands
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands
{
public class RelayCommand : ICommand
{

View File

@@ -5,7 +5,7 @@
using System;
using System.Windows.Input;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels.Commands
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands
{
public class RelayCommand<T> : ICommand
{

View File

@@ -6,12 +6,11 @@ using System;
using System.Drawing;
using System.Globalization;
using System.Runtime.CompilerServices;
using Microsoft.PowerToys.Settings.UI.Lib.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Lib.ViewModels.Commands;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class FancyZonesViewModel : Observable
{

View File

@@ -5,12 +5,12 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using Microsoft.PowerToys.Settings.UI.Lib.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Lib.ViewModels.Commands;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class GeneralViewModel : Observable
{

View File

@@ -8,11 +8,11 @@ using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using Microsoft.PowerToys.Settings.UI.Lib.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class ImageResizerViewModel : Observable
{
@@ -49,7 +49,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
#if DEBUG
if (e is ArgumentException || e is ArgumentNullException || e is PathTooLongException)
{
throw e;
throw;
}
#endif
Settings = new ImageResizerSettings();

View File

@@ -10,12 +10,12 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Input;
using Microsoft.PowerToys.Settings.UI.Lib.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Lib.ViewModels.Commands;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.ViewModels.Commands;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class KeyboardManagerViewModel : Observable
{
@@ -42,6 +42,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
private Func<List<KeysDataModel>, int> FilterRemapKeysList { get; }
[SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "Exceptions should not crash the program but will be logged until we can understand common exception scenarios")]
public KeyboardManagerViewModel(ISettingsUtils settingsUtils, ISettingsRepository<GeneralSettings> settingsRepository, Func<string, int> ipcMSGCallBackFunc, Func<List<KeysDataModel>, int> filterRemapKeysList)
{
if (settingsRepository == null)
@@ -69,7 +70,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
#if DEBUG
if (e is ArgumentException || e is ArgumentNullException || e is PathTooLongException)
{
throw e;
throw;
}
#endif
}

View File

@@ -6,10 +6,10 @@ using System;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Text.Json;
using Microsoft.PowerToys.Settings.UI.Lib.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class PowerLauncherViewModel : Observable
{

View File

@@ -4,10 +4,10 @@
using System;
using System.Runtime.CompilerServices;
using Microsoft.PowerToys.Settings.UI.Lib.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class PowerPreviewViewModel : Observable
{

View File

@@ -6,11 +6,11 @@ using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Runtime.CompilerServices;
using Microsoft.PowerToys.Settings.UI.Lib.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class PowerRenameViewModel : Observable
{
@@ -51,7 +51,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
#if DEBUG
if (e is ArgumentException || e is ArgumentNullException || e is PathTooLongException)
{
throw e;
throw;
}
#endif
PowerRenameLocalProperties localSettings = new PowerRenameLocalProperties();

View File

@@ -4,10 +4,10 @@
using System;
using System.Runtime.CompilerServices;
using Microsoft.PowerToys.Settings.UI.Lib.Helpers;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
{
public class ShortcutGuideViewModel : Observable
{

View File

@@ -75,7 +75,7 @@
<ProjectReference Include="..\..\common\interop\interop.vcxproj" />
<ProjectReference Include="..\..\common\ManagedCommon\ManagedCommon.csproj" />
<ProjectReference Include="..\..\common\ManagedTelemetry\Telemetry\Telemetry.csproj" />
<ProjectReference Include="..\Microsoft.PowerToys.Settings.UI.Lib\Microsoft.PowerToys.Settings.UI.Lib.csproj" />
<ProjectReference Include="..\Microsoft.PowerToys.Settings.UI.Library\Microsoft.PowerToys.Settings.UI.Library.csproj" />
<ProjectReference Include="..\Microsoft.PowerToys.Settings.UI\Microsoft.PowerToys.Settings.UI.csproj" />
</ItemGroup>

View File

@@ -1,6 +1,6 @@
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks;
using Moq;
using System;

View File

@@ -32,7 +32,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.PowerToys.Settings.UI.Lib\Microsoft.PowerToys.Settings.UI.Lib.csproj" />
<ProjectReference Include="..\Microsoft.PowerToys.Settings.UI.Library\Microsoft.PowerToys.Settings.UI.Library.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,4 +1,4 @@
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
using Moq;
using System;
using System.Collections.Generic;

View File

@@ -1,5 +1,5 @@
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
using Moq;
using System;

View File

@@ -3,8 +3,8 @@
// See the LICENSE file in the project root for more information.
using System;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks;
using Microsoft.PowerToys.Settings.UnitTest;
using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@@ -2,8 +2,8 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.Interface;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
namespace Microsoft.PowerToys.Settings.UnitTest
{

View File

@@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
using System;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace CommonLibTest

View File

@@ -6,7 +6,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks;

View File

@@ -6,8 +6,8 @@ using System;
using System.IO;
using System.Linq;
using System.Text.Json;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks;
using Microsoft.PowerToys.Settings.UnitTest;
using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@@ -5,8 +5,8 @@
using System.Globalization;
using System.IO;
using System.Text.Json;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.ViewModels;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.ViewModels;
using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility;
using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@@ -8,8 +8,8 @@ using System.Globalization;
using System.IO;
using System.Text.Json;
using CommonLibTest;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.ViewModels;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.ViewModels;
using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility;
using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@@ -6,8 +6,8 @@ using System;
using System.Globalization;
using System.IO;
using System.Text.Json;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.ViewModels;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.ViewModels;
using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility;
using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@@ -7,9 +7,9 @@ using System.Globalization;
using System.IO;
using System.Linq;
using System.Text.Json;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.Utilities;
using Microsoft.PowerToys.Settings.UI.Lib.ViewModels;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.Utilities;
using Microsoft.PowerToys.Settings.UI.Library.ViewModels;
using Microsoft.PowerToys.Settings.UI.UnitTests.BackwardsCompatibility;
using Microsoft.PowerToys.Settings.UI.UnitTests.Mocks;
using Microsoft.VisualStudio.TestTools.UnitTesting;

View File

@@ -4,8 +4,8 @@
using System.Collections.Generic;
using System.Linq;
using Microsoft.PowerToys.Settings.UI.Lib;
using Microsoft.PowerToys.Settings.UI.Lib.ViewModels;
using Microsoft.PowerToys.Settings.UI.Library;
using Microsoft.PowerToys.Settings.UI.Library.ViewModels;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace ViewModelTests

Some files were not shown because too many files have changed in this diff Show More