2021-10-25 19:39:48 +01: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-10-17 05:14:57 -04:00
|
|
|
|
|
2021-10-25 19:39:48 +01:00
|
|
|
|
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
|
|
|
|
|
{
|
|
|
|
|
|
public class FindMyMouseSettings : BasePTModuleSettings, ISettingsConfig
|
|
|
|
|
|
{
|
2021-11-23 10:19:26 +00:00
|
|
|
|
public const string ModuleName = "FindMyMouse";
|
2021-10-25 19:39:48 +01:00
|
|
|
|
|
|
|
|
|
|
[JsonPropertyName("properties")]
|
|
|
|
|
|
public FindMyMouseProperties Properties { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public FindMyMouseSettings()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = ModuleName;
|
|
|
|
|
|
Properties = new FindMyMouseProperties();
|
2023-09-04 17:58:37 +02:00
|
|
|
|
Version = "1.1";
|
2021-10-25 19:39:48 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string GetModuleName()
|
|
|
|
|
|
{
|
|
|
|
|
|
return Name;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// This can be utilized in the future if the settings.json file is to be modified/deleted.
|
|
|
|
|
|
public bool UpgradeSettingsConfiguration()
|
|
|
|
|
|
{
|
2023-09-04 17:58:37 +02:00
|
|
|
|
if (Version == "1.0")
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Properties.ActivationMethod.Value == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
Properties.ActivationMethod = new IntProperty(2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Version = "1.1";
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-10-25 19:39:48 +01:00
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|