2020-07-23 07:55:04 +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.
|
|
|
|
|
|
2020-05-08 23:22:57 +08:00
|
|
|
|
using System.Text.Json;
|
2020-04-17 02:45:27 +08:00
|
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
2020-10-23 00:45:48 +08:00
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
2020-04-17 02:45:27 +08:00
|
|
|
|
{
|
|
|
|
|
public class FZConfigProperties
|
|
|
|
|
{
|
2020-07-24 06:53:12 +08:00
|
|
|
|
public static readonly HotkeySettings DefaultHotkeyValue = new HotkeySettings(true, false, false, false, 0xc0);
|
|
|
|
|
|
2020-04-17 02:45:27 +08:00
|
|
|
|
public FZConfigProperties()
|
|
|
|
|
{
|
2020-07-24 06:53:12 +08:00
|
|
|
|
FancyzonesShiftDrag = new BoolProperty(ConfigDefaults.DefaultFancyzonesShiftDrag);
|
|
|
|
|
FancyzonesOverrideSnapHotkeys = new BoolProperty();
|
|
|
|
|
FancyzonesMouseSwitch = new BoolProperty();
|
|
|
|
|
FancyzonesMoveWindowsAcrossMonitors = new BoolProperty();
|
2020-08-21 18:53:03 +08:00
|
|
|
|
FancyzonesMoveWindowsBasedOnPosition = new BoolProperty();
|
2021-02-25 23:23:05 +08:00
|
|
|
|
FancyzonesOverlappingZonesAlgorithm = new IntProperty();
|
2020-07-24 06:53:12 +08:00
|
|
|
|
FancyzonesDisplayChangeMoveWindows = new BoolProperty();
|
|
|
|
|
FancyzonesZoneSetChangeMoveWindows = new BoolProperty();
|
|
|
|
|
FancyzonesAppLastZoneMoveWindows = new BoolProperty();
|
|
|
|
|
FancyzonesOpenWindowOnActiveMonitor = new BoolProperty();
|
|
|
|
|
FancyzonesRestoreSize = new BoolProperty();
|
2021-03-25 20:44:55 +08:00
|
|
|
|
FancyzonesQuickLayoutSwitch = new BoolProperty(ConfigDefaults.DefaultFancyzonesQuickLayoutSwitch);
|
|
|
|
|
FancyzonesFlashZonesOnQuickSwitch = new BoolProperty(ConfigDefaults.DefaultFancyzonesFlashZonesOnQuickSwitch);
|
2020-07-24 06:53:12 +08:00
|
|
|
|
UseCursorposEditorStartupscreen = new BoolProperty(ConfigDefaults.DefaultUseCursorposEditorStartupscreen);
|
|
|
|
|
FancyzonesShowOnAllMonitors = new BoolProperty();
|
2020-08-07 16:06:25 +08:00
|
|
|
|
FancyzonesSpanZonesAcrossMonitors = new BoolProperty();
|
2020-07-24 06:53:12 +08:00
|
|
|
|
FancyzonesZoneHighlightColor = new StringProperty(ConfigDefaults.DefaultFancyZonesZoneHighlightColor);
|
|
|
|
|
FancyzonesHighlightOpacity = new IntProperty(50);
|
|
|
|
|
FancyzonesEditorHotkey = new KeyboardKeysProperty(DefaultHotkeyValue);
|
|
|
|
|
FancyzonesMakeDraggedWindowTransparent = new BoolProperty();
|
|
|
|
|
FancyzonesExcludedApps = new StringProperty();
|
|
|
|
|
FancyzonesInActiveColor = new StringProperty(ConfigDefaults.DefaultFancyZonesInActiveColor);
|
|
|
|
|
FancyzonesBorderColor = new StringProperty(ConfigDefaults.DefaultFancyzonesBorderColor);
|
2020-04-17 02:45:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_shiftDrag")]
|
|
|
|
|
public BoolProperty FancyzonesShiftDrag { get; set; }
|
|
|
|
|
|
2020-05-08 04:29:02 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_mouseSwitch")]
|
|
|
|
|
public BoolProperty FancyzonesMouseSwitch { get; set; }
|
|
|
|
|
|
2020-04-17 02:45:27 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_overrideSnapHotkeys")]
|
|
|
|
|
public BoolProperty FancyzonesOverrideSnapHotkeys { get; set; }
|
|
|
|
|
|
2020-05-08 04:29:02 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_moveWindowAcrossMonitors")]
|
|
|
|
|
public BoolProperty FancyzonesMoveWindowsAcrossMonitors { get; set; }
|
2020-04-17 02:45:27 +08:00
|
|
|
|
|
2020-08-21 18:53:03 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_moveWindowsBasedOnPosition")]
|
|
|
|
|
public BoolProperty FancyzonesMoveWindowsBasedOnPosition { get; set; }
|
|
|
|
|
|
2021-02-25 23:23:05 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_overlappingZonesAlgorithm")]
|
|
|
|
|
public IntProperty FancyzonesOverlappingZonesAlgorithm { get; set; }
|
|
|
|
|
|
2020-04-17 02:45:27 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_displayChange_moveWindows")]
|
|
|
|
|
public BoolProperty FancyzonesDisplayChangeMoveWindows { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_zoneSetChange_moveWindows")]
|
|
|
|
|
public BoolProperty FancyzonesZoneSetChangeMoveWindows { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_appLastZone_moveWindows")]
|
|
|
|
|
public BoolProperty FancyzonesAppLastZoneMoveWindows { get; set; }
|
|
|
|
|
|
2020-07-08 16:37:42 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_openWindowOnActiveMonitor")]
|
|
|
|
|
public BoolProperty FancyzonesOpenWindowOnActiveMonitor { get; set; }
|
|
|
|
|
|
2020-07-01 21:36:05 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_restoreSize")]
|
|
|
|
|
public BoolProperty FancyzonesRestoreSize { get; set; }
|
|
|
|
|
|
2021-03-25 20:44:55 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_quickLayoutSwitch")]
|
|
|
|
|
public BoolProperty FancyzonesQuickLayoutSwitch { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_flashZonesOnQuickSwitch")]
|
|
|
|
|
public BoolProperty FancyzonesFlashZonesOnQuickSwitch { get; set; }
|
|
|
|
|
|
2020-04-17 02:45:27 +08:00
|
|
|
|
[JsonPropertyName("use_cursorpos_editor_startupscreen")]
|
|
|
|
|
public BoolProperty UseCursorposEditorStartupscreen { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_show_on_all_monitors")]
|
|
|
|
|
public BoolProperty FancyzonesShowOnAllMonitors { get; set; }
|
|
|
|
|
|
2020-08-07 16:06:25 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_span_zones_across_monitors")]
|
|
|
|
|
public BoolProperty FancyzonesSpanZonesAcrossMonitors { get; set; }
|
|
|
|
|
|
2020-05-08 04:29:02 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_makeDraggedWindowTransparent")]
|
|
|
|
|
public BoolProperty FancyzonesMakeDraggedWindowTransparent { get; set; }
|
|
|
|
|
|
2020-04-17 02:45:27 +08:00
|
|
|
|
[JsonPropertyName("fancyzones_zoneHighlightColor")]
|
|
|
|
|
public StringProperty FancyzonesZoneHighlightColor { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_highlight_opacity")]
|
|
|
|
|
public IntProperty FancyzonesHighlightOpacity { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_editor_hotkey")]
|
2020-07-22 05:06:39 +08:00
|
|
|
|
public KeyboardKeysProperty FancyzonesEditorHotkey { get; set; }
|
2020-04-17 02:45:27 +08:00
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_excluded_apps")]
|
|
|
|
|
public StringProperty FancyzonesExcludedApps { get; set; }
|
2020-04-18 06:25:08 +08:00
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_zoneBorderColor")]
|
|
|
|
|
public StringProperty FancyzonesBorderColor { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("fancyzones_zoneColor")]
|
|
|
|
|
public StringProperty FancyzonesInActiveColor { get; set; }
|
2020-05-08 23:22:57 +08:00
|
|
|
|
|
|
|
|
|
// converts the current to a json string.
|
|
|
|
|
public string ToJsonString()
|
|
|
|
|
{
|
|
|
|
|
return JsonSerializer.Serialize(this);
|
|
|
|
|
}
|
2020-04-17 02:45:27 +08:00
|
|
|
|
}
|
|
|
|
|
}
|