2020-04-08 01:19:14 +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-03-25 10:55:02 +08:00
|
|
|
|
using System.Text.Json;
|
|
|
|
|
|
2020-04-02 21:08:56 +08:00
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Lib
|
2020-03-25 10:55:02 +08:00
|
|
|
|
{
|
|
|
|
|
public class GeneralSettings
|
|
|
|
|
{
|
2020-04-08 01:19:14 +08:00
|
|
|
|
// Gets or sets a value indicating whether packaged.
|
|
|
|
|
public bool Packaged { get; set; }
|
|
|
|
|
|
|
|
|
|
// Gets or sets a value indicating whether run powertoys on start-up.
|
2020-03-25 10:55:02 +08:00
|
|
|
|
public bool startup { get; set; }
|
2020-04-08 01:19:14 +08:00
|
|
|
|
|
|
|
|
|
// Gets or sets a value indicating whether the powertoy elevated.
|
2020-03-25 10:55:02 +08:00
|
|
|
|
public bool is_elevated { get; set; }
|
2020-04-08 01:19:14 +08:00
|
|
|
|
|
|
|
|
|
// Gets or sets a value indicating whether powertoys should run elevated.
|
2020-03-25 10:55:02 +08:00
|
|
|
|
public bool run_elevated { get; set; }
|
2020-04-08 01:19:14 +08:00
|
|
|
|
|
|
|
|
|
// Gets or sets a value indicating whether is admin.
|
2020-03-25 10:55:02 +08:00
|
|
|
|
public bool is_admin { get; set; }
|
2020-04-08 01:19:14 +08:00
|
|
|
|
|
|
|
|
|
// Gets or sets theme Name.
|
2020-03-25 10:55:02 +08:00
|
|
|
|
public string theme { get; set; }
|
2020-04-08 01:19:14 +08:00
|
|
|
|
|
|
|
|
|
// Gets or sets system theme name.
|
2020-03-25 10:55:02 +08:00
|
|
|
|
public string system_theme { get; set; }
|
2020-04-08 01:19:14 +08:00
|
|
|
|
|
|
|
|
|
// Gets or sets powertoys version number.
|
2020-03-25 10:55:02 +08:00
|
|
|
|
public string powertoys_version { get; set; }
|
|
|
|
|
|
2020-03-30 20:38:03 +08:00
|
|
|
|
public GeneralSettings()
|
|
|
|
|
{
|
2020-04-11 06:22:07 +08:00
|
|
|
|
Packaged = false;
|
|
|
|
|
startup = false;
|
|
|
|
|
is_admin = false;
|
|
|
|
|
is_elevated = false;
|
|
|
|
|
theme = "system";
|
|
|
|
|
system_theme = "light";
|
|
|
|
|
powertoys_version = "v0.15.3";
|
2020-03-30 20:38:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-08 01:19:14 +08:00
|
|
|
|
// converts the current to a json string.
|
2020-04-02 21:08:56 +08:00
|
|
|
|
public string ToJsonString()
|
2020-03-25 10:55:02 +08:00
|
|
|
|
{
|
|
|
|
|
return JsonSerializer.Serialize(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|