mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 00:46:12 +02:00
Rename Plugin & API namespaces and implement saving/loading of setting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user