Core - Refactor ResourceLocation

This commit is contained in:
miku-666
2025-11-20 02:45:41 +01:00
parent 1abd4efd94
commit 1edc12b4ff
13 changed files with 194 additions and 167 deletions

View File

@@ -1,5 +1,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
namespace PckStudio.Core.Extensions
{
@@ -15,6 +17,17 @@ namespace PckStudio.Core.Extensions
yield break;
}
public static ImageList ToImageList(this Image[] images)
{
ImageList imageList = new ImageList
{
ColorDepth = ColorDepth.Depth32Bit
};
imageList.Images.AddRange(images);
return imageList;
}
public static bool EqualsAny<T>(this T type, params T[] items)
{
foreach (T item in items)