Added playlist logic.
This commit is contained in:
21
Harmonia.Core/Events/PlaylistUpdateAction.cs
Normal file
21
Harmonia.Core/Events/PlaylistUpdateAction.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace Harmonia.Core.Events;
|
||||
|
||||
public enum PlaylistUpdateAction
|
||||
{
|
||||
/// <summary>
|
||||
/// An item was added to the collection.
|
||||
/// </summary>
|
||||
Add,
|
||||
/// <summary>
|
||||
/// An item was removed from the collection.
|
||||
/// </summary>
|
||||
Remove,
|
||||
/// <summary>
|
||||
/// An item was moved within the collection.
|
||||
/// </summary>
|
||||
Move,
|
||||
/// <summary>
|
||||
/// The contents of the collection changed dramatically.
|
||||
/// </summary>
|
||||
Reset
|
||||
}
|
||||
12
Harmonia.Core/Events/PlaylistUpdatedEventArgs.cs
Normal file
12
Harmonia.Core/Events/PlaylistUpdatedEventArgs.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Harmonia.Core.Models;
|
||||
|
||||
namespace Harmonia.Core.Events;
|
||||
|
||||
public class PlaylistUpdatedEventArgs : EventArgs
|
||||
{
|
||||
public required PlaylistUpdateAction Action { get; init; }
|
||||
public required int Index { get; init; }
|
||||
public int? NewIndex { get; init; } = -1;
|
||||
public required int Count { get; init; }
|
||||
public required PlaylistSong[] Songs { get; init; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user