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-08 01:19:14 +08:00
|
|
|
|
this.Packaged = false;
|
2020-03-30 20:38:03 +08:00
|
|
|
|
this.startup = false;
|
|
|
|
|
this.is_admin = false;
|
|
|
|
|
this.is_elevated = false;
|
|
|
|
|
this.theme = "system";
|
|
|
|
|
this.system_theme = "light";
|
|
|
|
|
this.powertoys_version = "v0.15.3";
|
|
|
|
|
}
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|