2020-08-18 01:00:56 +08:00
|
|
|
|
// Copyright (c) Microsoft Corporation
|
|
|
|
|
// 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;
|
2020-09-24 04:20:32 +08:00
|
|
|
|
using System.Text.Json;
|
2020-08-18 01:00:56 +08:00
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
2020-10-23 00:45:48 +08:00
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
2020-08-18 01:00:56 +08:00
|
|
|
|
{
|
|
|
|
|
public class RemapKeysDataModel
|
|
|
|
|
{
|
2020-10-20 04:32:05 +08:00
|
|
|
|
// Suppressing this warning because removing the setter breaks
|
|
|
|
|
// deserialization with System.Text.Json. This affects the UI display.
|
|
|
|
|
// See: https://github.com/dotnet/runtime/issues/30258
|
2020-08-18 01:00:56 +08:00
|
|
|
|
[JsonPropertyName("inProcess")]
|
2020-10-20 04:32:05 +08:00
|
|
|
|
#pragma warning disable CA2227 // Collection properties should be read only
|
2020-08-18 01:00:56 +08:00
|
|
|
|
public List<KeysDataModel> InProcessRemapKeys { get; set; }
|
2020-10-20 04:32:05 +08:00
|
|
|
|
#pragma warning restore CA2227 // Collection properties should be read only
|
2020-08-18 01:00:56 +08:00
|
|
|
|
|
|
|
|
|
public RemapKeysDataModel()
|
|
|
|
|
{
|
|
|
|
|
InProcessRemapKeys = new List<KeysDataModel>();
|
|
|
|
|
}
|
2020-09-24 04:20:32 +08:00
|
|
|
|
|
|
|
|
|
public string ToJsonString()
|
|
|
|
|
{
|
|
|
|
|
return JsonSerializer.Serialize(this);
|
|
|
|
|
}
|
2020-08-18 01:00:56 +08:00
|
|
|
|
}
|
|
|
|
|
}
|