mirror of
https://github.com/jayfunc/BetterLyrics.git
synced 2026-01-12 19:08:33 +08:00
- Add album text in lyrics render - Improve song info update and draw algo - Upgrade to .NET 10
16 lines
411 B
C#
16 lines
411 B
C#
using System;
|
|
|
|
namespace BetterLyrics.WinUI3.Helper
|
|
{
|
|
public static class EnumExtensions
|
|
{
|
|
public static T GetNext<T>(this T value) where T : struct, Enum
|
|
{
|
|
T[] values = Enum.GetValues<T>();
|
|
int currentIndex = Array.IndexOf(values, value);
|
|
int nextIndex = (currentIndex + 1) % values.Length;
|
|
return values[nextIndex];
|
|
}
|
|
}
|
|
}
|