Added playlist view and initial playlist view logic.

This commit is contained in:
2025-03-10 09:50:05 -04:00
parent 9890236710
commit bd9b30abbd
19 changed files with 619 additions and 20 deletions

View File

@@ -0,0 +1,28 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Data.Converters;
using Harmonia.Core.Player;
using System;
using System.Globalization;
namespace Harmonia.UI.Converters;
public class RepeatStateToIconConverter : IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is not RepeatState repeatMode)
return null;
string resourceName = repeatMode == RepeatState.RepeatOne
? "RepeatOneIcon"
: "RepeatIcon";
return Application.Current?.FindResource(resourceName);
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}