-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added shortcut guide settings (#2247)
- Loading branch information
Lavius Motileng
committed
Apr 20, 2020
1 parent
0417b62
commit cae77ae
Showing
14 changed files
with
450 additions
and
49 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
src/core/Microsoft.PowerToys.Settings.UI.Lib/DoubleProperty.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// 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 | ||
{ | ||
|
||
// Represents the configuration property of the settings that store Double type. | ||
public class DoubleProperty | ||
{ | ||
public DoubleProperty() | ||
{ | ||
this.Value = 0.0; | ||
} | ||
|
||
// Gets or sets the double value of the settings configuration. | ||
[JsonPropertyName("value")] | ||
public double Value { get; set; } | ||
|
||
// Returns a JSON version of the class settings configuration class. | ||
public override string ToString() | ||
{ | ||
return JsonSerializer.Serialize(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutGuideProperties.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// 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; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Microsoft.PowerToys.Settings.UI.Lib | ||
{ | ||
|
||
public class ShortcutGuideProperties | ||
{ | ||
public ShortcutGuideProperties() | ||
{ | ||
OverlayOpacity = new IntProperty(); | ||
PressTime = new IntProperty(); | ||
Theme = new StringProperty(); | ||
} | ||
|
||
[JsonPropertyName("overlay_opacity")] | ||
public IntProperty OverlayOpacity { get; set; } | ||
|
||
[JsonPropertyName("press_time")] | ||
public IntProperty PressTime { get; set; } | ||
|
||
[JsonPropertyName("theme")] | ||
public StringProperty Theme { get; set; } | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/core/Microsoft.PowerToys.Settings.UI.Lib/ShortcutGuideSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// 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; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Microsoft.PowerToys.Settings.UI.Lib | ||
{ | ||
public class ShortcutGuideSettings | ||
{ | ||
public ShortcutGuideSettings() | ||
{ | ||
Name = "Shortcut Guide"; | ||
Properties = new ShortcutGuideProperties(); | ||
Version = "1.0"; | ||
} | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonPropertyName("properties")] | ||
public ShortcutGuideProperties Properties { get; set; } | ||
|
||
[JsonPropertyName("version")] | ||
public string Version { get; set; } | ||
|
||
public string ToJsonString() | ||
{ | ||
return JsonSerializer.Serialize(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/core/Microsoft.PowerToys.Settings.UI.Lib/SndShortcutGuideSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Microsoft.PowerToys.Settings.UI.Lib | ||
{ | ||
|
||
public class SndShortcutGuideSettings | ||
{ | ||
[JsonPropertyName("Shortcut Guide")] | ||
public ShortcutGuideSettings ShortcutGuide { get; set; } | ||
|
||
public SndShortcutGuideSettings(ShortcutGuideSettings settings) | ||
{ | ||
this.ShortcutGuide = settings; | ||
} | ||
|
||
public string ToJsonString() | ||
{ | ||
return JsonSerializer.Serialize(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.