-
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.
- Loading branch information
Lavius Motileng
committed
Apr 16, 2020
1 parent
c37884b
commit 10c0325
Showing
20 changed files
with
908 additions
and
131 deletions.
There are no files selected for viewing
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
34 changes: 34 additions & 0 deletions
34
src/core/Microsoft.PowerToys.Settings.UI.Lib/EnabledModules.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,34 @@ | ||
// 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.Serialization; | ||
|
||
namespace Microsoft.PowerToys.Settings.UI.Lib | ||
{ | ||
public class EnabledModules | ||
{ | ||
public EnabledModules() | ||
{ | ||
this.FancyZones = false; | ||
this.ImageResizer = false; | ||
this.FileExplorerPreview = false; | ||
this.PowerRename = false; | ||
this.ShortcutGuide = true; | ||
} | ||
|
||
[JsonPropertyName("FancyZones")] | ||
public bool FancyZones { get; set; } | ||
|
||
[JsonPropertyName("ImageResizer")] | ||
public bool ImageResizer { get; set; } | ||
|
||
[JsonPropertyName("File Explorer Preview")] | ||
public bool FileExplorerPreview { get; set; } | ||
|
||
[JsonPropertyName("Shortcut Guide")] | ||
public bool ShortcutGuide { get; set; } | ||
|
||
public bool PowerRename { get; set; } | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
src/core/Microsoft.PowerToys.Settings.UI.Lib/FZConfigProperties.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,66 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Microsoft.PowerToys.Settings.UI.Lib | ||
{ | ||
public class FZConfigProperties | ||
{ | ||
public FZConfigProperties() | ||
{ | ||
this.FancyzonesShiftDrag = new BoolProperty(); | ||
this.FancyzonesOverrideSnapHotkeys = new BoolProperty(); | ||
this.FancyzonesZoneSetChangeFlashZones = new BoolProperty(); | ||
this.FancyzonesDisplayChangeMoveWindows = new BoolProperty(); | ||
this.FancyzonesZoneSetChangeMoveWindows = new BoolProperty(); | ||
this.FancyzonesVirtualDesktopChangeMoveWindows = new BoolProperty(); | ||
this.FancyzonesAppLastZoneMoveWindows = new BoolProperty(); | ||
this.UseCursorposEditorStartupscreen = new BoolProperty(); | ||
this.FancyzonesShowOnAllMonitors = new BoolProperty(); | ||
this.FancyzonesZoneHighlightColor = new StringProperty(); | ||
this.FancyzonesHighlightOpacity = new IntProperty(); | ||
this.FancyzonesEditorHotkey = new KeyBoardKeysProperty(); | ||
this.FancyzonesExcludedApps = new StringProperty(); | ||
} | ||
|
||
[JsonPropertyName("fancyzones_shiftDrag")] | ||
public BoolProperty FancyzonesShiftDrag { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_overrideSnapHotkeys")] | ||
public BoolProperty FancyzonesOverrideSnapHotkeys { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_zoneSetChange_flashZones")] | ||
public BoolProperty FancyzonesZoneSetChangeFlashZones { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_displayChange_moveWindows")] | ||
public BoolProperty FancyzonesDisplayChangeMoveWindows { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_zoneSetChange_moveWindows")] | ||
public BoolProperty FancyzonesZoneSetChangeMoveWindows { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_virtualDesktopChange_moveWindows")] | ||
public BoolProperty FancyzonesVirtualDesktopChangeMoveWindows { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_appLastZone_moveWindows")] | ||
public BoolProperty FancyzonesAppLastZoneMoveWindows { get; set; } | ||
|
||
[JsonPropertyName("use_cursorpos_editor_startupscreen")] | ||
public BoolProperty UseCursorposEditorStartupscreen { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_show_on_all_monitors")] | ||
public BoolProperty FancyzonesShowOnAllMonitors { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_zoneHighlightColor")] | ||
public StringProperty FancyzonesZoneHighlightColor { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_highlight_opacity")] | ||
public IntProperty FancyzonesHighlightOpacity { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_editor_hotkey")] | ||
public KeyBoardKeysProperty FancyzonesEditorHotkey { get; set; } | ||
|
||
[JsonPropertyName("fancyzones_excluded_apps")] | ||
public StringProperty FancyzonesExcludedApps { get; set; } | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/core/Microsoft.PowerToys.Settings.UI.Lib/FancyZonesSettings.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 FancyZonesSettings | ||
{ | ||
public FancyZonesSettings() | ||
{ | ||
this.Version = string.Empty; | ||
this.Name = string.Empty; | ||
this.Properties = new FZConfigProperties(); | ||
} | ||
|
||
[JsonPropertyName("version")] | ||
public string Version { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonPropertyName("properties")] | ||
public FZConfigProperties Properties { 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
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
22 changes: 22 additions & 0 deletions
22
src/core/Microsoft.PowerToys.Settings.UI.Lib/KeyBoardKeysProperty.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,22 @@ | ||
// 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 KeyBoardKeysProperty | ||
{ | ||
public KeyBoardKeysProperty() | ||
{ | ||
this.Value = new HotkeySettings(); | ||
} | ||
|
||
[JsonPropertyName("value")] | ||
public HotkeySettings Value { get; set; } | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/core/Microsoft.PowerToys.Settings.UI.Lib/SndFancyZonesSettings.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,23 @@ | ||
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 SndFancyZonesSettings | ||
{ | ||
public FancyZonesSettings FancyZones { get; set; } | ||
|
||
public SndFancyZonesSettings(FancyZonesSettings settings) | ||
{ | ||
this.FancyZones = settings; | ||
} | ||
|
||
public string ToJsonString() | ||
{ | ||
return JsonSerializer.Serialize(this); | ||
} | ||
} | ||
} |
Oops, something went wrong.