2022-10-13 13:05:43 +02: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.
|
|
|
|
|
|
|
|
|
|
|
|
using System.Text.Json.Serialization;
|
2024-04-02 01:09:47 +02:00
|
|
|
|
using Settings.UI.Library.Attributes;
|
2022-10-13 13:05:43 +02:00
|
|
|
|
using Settings.UI.Library.Enumerations;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
|
|
|
|
|
{
|
|
|
|
|
|
public class HostsProperties
|
|
|
|
|
|
{
|
|
|
|
|
|
[JsonConverter(typeof(BoolPropertyJsonConverter))]
|
|
|
|
|
|
public bool ShowStartupWarning { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[JsonConverter(typeof(BoolPropertyJsonConverter))]
|
|
|
|
|
|
public bool LaunchAdministrator { get; set; }
|
|
|
|
|
|
|
2023-02-27 19:11:57 +01:00
|
|
|
|
[JsonConverter(typeof(BoolPropertyJsonConverter))]
|
|
|
|
|
|
public bool LoopbackDuplicates { get; set; }
|
|
|
|
|
|
|
2023-06-06 17:11:37 +02:00
|
|
|
|
public HostsAdditionalLinesPosition AdditionalLinesPosition { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public HostsEncoding Encoding { get; set; }
|
2022-10-13 13:05:43 +02:00
|
|
|
|
|
|
|
|
|
|
public HostsProperties()
|
|
|
|
|
|
{
|
|
|
|
|
|
ShowStartupWarning = true;
|
|
|
|
|
|
LaunchAdministrator = true;
|
2023-02-27 19:11:57 +01:00
|
|
|
|
LoopbackDuplicates = false;
|
2023-06-06 17:11:37 +02:00
|
|
|
|
AdditionalLinesPosition = HostsAdditionalLinesPosition.Top;
|
|
|
|
|
|
Encoding = HostsEncoding.Utf8;
|
2022-10-13 13:05:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|