using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Media;
using static MPF.Frontend.InterfaceConstants;
namespace MPF.UI
{
///
/// Variables for UI elements
///
public static class Constants
{
///
/// Set of accepted speeds for CD and GD media
///
public static DoubleCollection SpeedsForCDAsCollection => GetDoubleCollectionFromIntList(CD);
///
/// Set of accepted speeds for DVD media
///
public static DoubleCollection SpeedsForDVDAsCollection => GetDoubleCollectionFromIntList(DVD);
///
/// Set of accepted speeds for HD-DVD media
///
public static DoubleCollection SpeedsForHDDVDAsCollection => GetDoubleCollectionFromIntList(HDDVD);
///
/// Set of accepted speeds for BD media
///
public static DoubleCollection SpeedsForBDAsCollection => GetDoubleCollectionFromIntList(BD);
///
/// Create a DoubleCollection out of a list of integer values
///
private static DoubleCollection GetDoubleCollectionFromIntList(IList list)
=> new(list.Select(i => Convert.ToDouble(i)).ToList());
}
}