mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[Chore] Run solution code cleanup (#20584)
This commit is contained in:
@@ -38,14 +38,12 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
public ColorPickerActivationAction ActivationAction { get; set; }
|
||||
|
||||
[JsonPropertyName("colorhistory")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Need to change this collection")]
|
||||
public List<string> ColorHistory { get; set; }
|
||||
|
||||
[JsonPropertyName("colorhistorylimit")]
|
||||
public int ColorHistoryLimit { get; set; }
|
||||
|
||||
[JsonPropertyName("visiblecolorformats")]
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Need to change this collection")]
|
||||
public Dictionary<string, bool> VisibleColorFormats { get; set; }
|
||||
|
||||
[JsonPropertyName("showcolorname")]
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
||||
|
||||
@@ -136,8 +136,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
case 40: // The Down Arrow key or button.
|
||||
case 37: // The Left Arrow key or button.
|
||||
case 39: // The Right Arrow key or button.
|
||||
// case 8: // The Back key or button.
|
||||
// case 13: // The Enter key or button.
|
||||
// case 8: // The Back key or button.
|
||||
// case 13: // The Enter key or button.
|
||||
shortcutList.Add(Code);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -14,9 +14,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
// deserialization with System.Text.Json. This affects the UI display.
|
||||
// See: https://github.com/dotnet/runtime/issues/30258
|
||||
[JsonPropertyName("value")]
|
||||
#pragma warning disable CA2227 // Collection properties should be read only
|
||||
public ObservableCollection<ImageSize> Value { get; set; }
|
||||
#pragma warning restore CA2227 // Collection properties should be read only
|
||||
|
||||
public ImageResizerSizes()
|
||||
{
|
||||
|
||||
@@ -2,10 +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 System.Collections.Generic;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Enumerations;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text.Json.Serialization;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Enumerations;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
|
||||
@@ -14,9 +14,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
// deserialization with System.Text.Json. This affects the UI display.
|
||||
// See: https://github.com/dotnet/runtime/issues/30258
|
||||
[JsonPropertyName("inProcess")]
|
||||
#pragma warning disable CA2227 // Collection properties should be read only
|
||||
public List<KeysDataModel> InProcessRemapKeys { get; set; }
|
||||
#pragma warning restore CA2227 // Collection properties should be read only
|
||||
|
||||
public RemapKeysDataModel()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.IO.Abstractions;
|
||||
using System.Text.Json;
|
||||
|
||||
@@ -14,14 +14,10 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
// deserialization with System.Text.Json. This affects the UI display.
|
||||
// See: https://github.com/dotnet/runtime/issues/30258
|
||||
[JsonPropertyName("global")]
|
||||
#pragma warning disable CA2227 // Collection properties should be read only
|
||||
public List<KeysDataModel> GlobalRemapShortcuts { get; set; }
|
||||
#pragma warning restore CA2227 // Collection properties should be read only
|
||||
|
||||
[JsonPropertyName("appSpecific")]
|
||||
#pragma warning disable CA2227 // Collection properties should be read only
|
||||
public List<AppSpecificKeysDataModel> AppSpecificRemapShortcuts { get; set; }
|
||||
#pragma warning restore CA2227 // Collection properties should be read only
|
||||
|
||||
public ShortcutsKeyDataModel()
|
||||
{
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Library.Utilities
|
||||
{
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
|
||||
@@ -3,14 +3,9 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.Json;
|
||||
using System.Timers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Enumerations;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.PowerToys.Settings.UI.Library.Helpers;
|
||||
@@ -89,14 +88,14 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
{
|
||||
if (value != _powerRenameEnabled)
|
||||
{
|
||||
GeneralSettingsConfig.Enabled.PowerRename = value;
|
||||
OutGoingGeneralSettings snd = new OutGoingGeneralSettings(GeneralSettingsConfig);
|
||||
GeneralSettingsConfig.Enabled.PowerRename = value;
|
||||
OutGoingGeneralSettings snd = new OutGoingGeneralSettings(GeneralSettingsConfig);
|
||||
|
||||
SendConfigMSG(snd.ToString());
|
||||
SendConfigMSG(snd.ToString());
|
||||
|
||||
_powerRenameEnabled = value;
|
||||
OnPropertyChanged(nameof(IsEnabled));
|
||||
RaisePropertyChanged(nameof(GlobalAndMruEnabled));
|
||||
_powerRenameEnabled = value;
|
||||
OnPropertyChanged(nameof(IsEnabled));
|
||||
RaisePropertyChanged(nameof(GlobalAndMruEnabled));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -400,9 +399,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
return _settingsConfigFileFolder + "\\" + ModuleName;
|
||||
}
|
||||
|
||||
#pragma warning disable CA1030 // Use events where appropriate
|
||||
public void RaisePropertyChanged([CallerMemberName] string propertyName = null)
|
||||
#pragma warning restore CA1030 // Use events where appropriate
|
||||
{
|
||||
OnPropertyChanged(propertyName);
|
||||
SndVideoConferenceSettings outsettings = new SndVideoConferenceSettings(Settings);
|
||||
|
||||
Reference in New Issue
Block a user