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
@@ -1,6 +1,6 @@
using System;
namespace DesktopMagicPluginAPI.Settings;
namespace DesktopMagic.Api.Settings;
/// <summary>
/// Represents a up-down control.
@@ -61,4 +61,15 @@ public class IntegerUpDown : Setting
Maximum = max;
Value = value;
}
internal override string GetJsonValue()
{
return Value.ToString();
}
internal override void SetJsonValue(string value)
{
_ = int.TryParse(value, out int result);
Value = result;
}
}