mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-04 05:35:52 +00:00
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Windows.Media;
|
|
using static MPF.Frontend.InterfaceConstants;
|
|
|
|
namespace MPF.UI
|
|
{
|
|
/// <summary>
|
|
/// Variables for UI elements
|
|
/// </summary>
|
|
public static class Constants
|
|
{
|
|
/// <summary>
|
|
/// Set of accepted speeds for CD and GD media
|
|
/// </summary>
|
|
public static DoubleCollection SpeedsForCDAsCollection => GetDoubleCollectionFromIntList(CD);
|
|
|
|
/// <summary>
|
|
/// Set of accepted speeds for DVD media
|
|
/// </summary>
|
|
public static DoubleCollection SpeedsForDVDAsCollection => GetDoubleCollectionFromIntList(DVD);
|
|
|
|
/// <summary>
|
|
/// Set of accepted speeds for HD-DVD media
|
|
/// </summary>
|
|
public static DoubleCollection SpeedsForHDDVDAsCollection => GetDoubleCollectionFromIntList(HDDVD);
|
|
|
|
/// <summary>
|
|
/// Set of accepted speeds for BD media
|
|
/// </summary>
|
|
public static DoubleCollection SpeedsForBDAsCollection => GetDoubleCollectionFromIntList(BD);
|
|
|
|
/// <summary>
|
|
/// Create a DoubleCollection out of a list of integer values
|
|
/// </summary>
|
|
private static DoubleCollection GetDoubleCollectionFromIntList(List<int> list)
|
|
=> [.. list.ConvertAll(i => Convert.ToDouble(i))];
|
|
}
|
|
}
|