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
+6 -7
View File
@@ -1,6 +1,5 @@
using DesktopMagicPluginAPI;
using DesktopMagicPluginAPI.Inputs;
using DesktopMagicPluginAPI.Settings;
using DesktopMagic.Api;
using DesktopMagic.Api.Settings;
using System;
using System.Collections.Generic;
@@ -9,16 +8,16 @@ using System.Drawing.Imaging;
using System.IO;
using System.Threading.Tasks;
namespace DesktopMagicPlugin.Test;
namespace DesktopMagic.PluginTest;
public class GifPlugin : Plugin
{
private const string SaveFilePath = "gifPath.txt";
[Setting("Gif path:")]
[Setting("gif-path", "Gif path:")]
private readonly TextBox input = new TextBox("");
[Setting]
[Setting("info")]
private readonly Label info = new Label("");
private readonly List<Bitmap> bitmaps = [];
@@ -64,7 +63,7 @@ public class GifPlugin : Plugin
PropertyItem item = gif.GetPropertyItem(0x5100); // FrameDelay in libgdiplus
UpdateInterval = (item.Value[0] + (item.Value[1] * 256)) * 10; //FrameDelay in ms
UpdateInterval = (item.Value[0] + item.Value[1] * 256) * 10; //FrameDelay in ms
bitmaps.Clear();
for (int i = 0; i < gif.GetFrameCount(FrameDimension.Time); i++)
{