mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Add keyboard manager settings ui[Part-1] (#1979)
* Added view and data models for keyboard remapper settings page * Added intial UI of Keyboard manager settings page * Fixed Sln file configs * Resolve UI changes PR comments * Added UId for UI elements * Moved Ui strings to resx * resolve stylecop warnings * Fixed missing tag from resx file
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// 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.Text.Json;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
public class KeyboardManagerProperties
|
||||
{
|
||||
// Bool property to notify Keyboard Manager module if the Edit Shortcut button is pressed.
|
||||
public BoolProperty EditShortcut { get; set; }
|
||||
|
||||
// Bool property to notify Keyboard Manager module if the Remap Keyboard button is pressed.
|
||||
public BoolProperty RemapKeyboard { get; set; }
|
||||
|
||||
public KeyboardManagerProperties()
|
||||
{
|
||||
this.EditShortcut = new BoolProperty();
|
||||
this.RemapKeyboard = new BoolProperty();
|
||||
}
|
||||
|
||||
public string ToJsonString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
public class KeyboardManagerSettings : BasePTModuleSettings
|
||||
{
|
||||
public KeyboardManagerProperties properties { get; set; }
|
||||
|
||||
public KeyboardManagerSettings()
|
||||
{
|
||||
this.properties = new KeyboardManagerProperties();
|
||||
this.version = "1";
|
||||
this.name = "_unset_";
|
||||
}
|
||||
|
||||
public KeyboardManagerSettings(string ptName)
|
||||
{
|
||||
this.properties = new KeyboardManagerProperties();
|
||||
this.version = "1";
|
||||
this.name = ptName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// 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.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
public class SndKeyboardManagerSettings
|
||||
{
|
||||
[JsonPropertyName("Keyboard Manager")]
|
||||
public KeyboardManagerSettings keyboardManagerSettings { get; }
|
||||
|
||||
public SndKeyboardManagerSettings(KeyboardManagerSettings keyboardManagerSettings)
|
||||
{
|
||||
this.keyboardManagerSettings = keyboardManagerSettings;
|
||||
}
|
||||
|
||||
public string ToJsonString()
|
||||
{
|
||||
return JsonSerializer.Serialize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user