Rename Plugin & API namespaces and implement saving/loading of setting

This commit is contained in:
Stone_Red
2023-11-21 19:54:29 +01:00
parent 1f9e123893
commit e8de6fe9a5
35 changed files with 247 additions and 138 deletions
+12 -1
View File
@@ -1,6 +1,6 @@
using System;
namespace DesktopMagicPluginAPI.Settings;
namespace DesktopMagic.Api.Settings;
/// <summary>
/// Represents a slider control.
@@ -60,4 +60,15 @@ public sealed class Slider : Setting
Maximum = max;
Value = value;
}
internal override string GetJsonValue()
{
return Value.ToString();
}
internal override void SetJsonValue(string value)
{
_ = double.TryParse(value, out double result);
Value = result;
}
}