Renaming properties to C# styling to fix warnings (#5166)

* Renaming properties

* Update PowerLauncherProperties.cs

trying to kick CI

* PowerLauncher is way for naming.

Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
This commit is contained in:
Clint Rutkas
2020-07-23 11:01:49 -07:00
committed by GitHub
parent f25d2b3a86
commit 2bd2ec7a2e
8 changed files with 107 additions and 98 deletions

View File

@@ -1,45 +1,60 @@
// Copyright (c) Microsoft Corporation
// 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 PowerLauncherProperties
{
public string search_result_preference { get; set; }
[JsonPropertyName("search_result_preference")]
public string SearchResultPreference { get; set; }
public string search_type_preference { get; set; }
[JsonPropertyName("search_type_preference")]
public string SearchTypePreference { get; set; }
public int maximum_number_of_results { get; set; }
[JsonPropertyName("maximum_number_of_results")]
public int MaximumNumberOfResults { get; set; }
public HotkeySettings open_powerlauncher { get; set; }
[JsonPropertyName("open_powerlauncher")]
public HotkeySettings OpenPowerLauncher { get; set; }
public HotkeySettings open_file_location { get; set; }
[JsonPropertyName("open_file_location")]
public HotkeySettings OpenFileLocation { get; set; }
public HotkeySettings copy_path_location { get; set; }
[JsonPropertyName("copy_path_location")]
public HotkeySettings CopyPathLocation { get; set; }
public HotkeySettings open_console { get; set; }
[JsonPropertyName("open_console")]
public HotkeySettings OpenConsole { get; set; }
public bool override_win_r_key { get; set; }
[JsonPropertyName("override_win_r_key")]
public bool OverrideWinkeyR { get; set; }
public bool override_win_s_key { get; set; }
[JsonPropertyName("override_win_s_key")]
public bool OverrideWinkeyS { get; set; }
public bool ignore_hotkeys_in_fullscreen { get; set; }
[JsonPropertyName("ignore_hotkeys_in_fullscreen")]
public bool IgnoreHotkeysInFullscreen { get; set; }
public bool disable_drive_detection_warning { get; set; }
public bool clear_input_on_launch { get; set; }
[JsonPropertyName("disable_drive_detection_warning")]
public bool DisableDriveDetectionWarning { get; set; }
[JsonPropertyName("clear_input_on_launch")]
public bool ClearInputOnLaunch { get; set; }
public PowerLauncherProperties()
{
open_powerlauncher = new HotkeySettings();
open_file_location = new HotkeySettings();
copy_path_location = new HotkeySettings();
open_console = new HotkeySettings();
search_result_preference = "most_recently_used";
search_type_preference = "application_name";
ignore_hotkeys_in_fullscreen = false;
disable_drive_detection_warning = false;
clear_input_on_launch = false;
OpenPowerLauncher = new HotkeySettings();
OpenFileLocation = new HotkeySettings();
CopyPathLocation = new HotkeySettings();
OpenConsole = new HotkeySettings();
SearchResultPreference = "most_recently_used";
SearchTypePreference = "application_name";
IgnoreHotkeysInFullscreen = false;
DisableDriveDetectionWarning = false;
ClearInputOnLaunch = false;
}
}
}

View File

@@ -2,35 +2,29 @@
// 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 PowerPreviewSettings : BasePTModuleSettings
{
public PowerPreviewProperties properties { get; set; }
public const string ModuleName = "File Explorer";
[JsonPropertyName("Properties")]
public PowerPreviewProperties Properties { get; set; }
public PowerPreviewSettings()
{
properties = new PowerPreviewProperties();
Properties = new PowerPreviewProperties();
Version = "1";
Name = "File Explorer";
Name = ModuleName;
}
public PowerPreviewSettings(string ptName)
{
properties = new PowerPreviewProperties();
Properties = new PowerPreviewProperties();
Version = "1";
Name = ptName;
}
public override string ToJsonString()
{
return JsonSerializer.Serialize(this);
}
}
}