2023-04-27 16:38:24 +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.IO;
|
2024-09-16 16:09:43 -04:00
|
|
|
|
|
2023-04-27 16:38:24 +02:00
|
|
|
|
using Microsoft.PowerToys.Settings.UI.Library;
|
|
|
|
|
|
using Settings.UI.Library.Enumerations;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MeasureToolUI
|
|
|
|
|
|
{
|
|
|
|
|
|
public sealed class Settings
|
|
|
|
|
|
{
|
|
|
|
|
|
private static readonly SettingsUtils ModuleSettings = new();
|
|
|
|
|
|
|
|
|
|
|
|
public MeasureToolMeasureStyle DefaultMeasureStyle
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
return (MeasureToolMeasureStyle)ModuleSettings.GetSettings<MeasureToolSettings>(MeasureToolSettings.ModuleName).Properties.DefaultMeasureStyle.Value;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (FileNotFoundException)
|
|
|
|
|
|
{
|
|
|
|
|
|
return MeasureToolMeasureStyle.None;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|