mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-24 06:40:09 +00:00
38 lines
762 B
C#
38 lines
762 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace MSFSPopoutPanelManager.DomainModel.Profile
|
|
{
|
|
public class PanelConfigColors
|
|
{
|
|
public static string GetNextAvailableColor(List<PanelConfig> panelConfigs)
|
|
{
|
|
foreach (var colorName in Enum.GetNames<Colors>())
|
|
{
|
|
if (panelConfigs.Any(p => p.PanelSource.Color == colorName))
|
|
continue;
|
|
|
|
return colorName;
|
|
}
|
|
|
|
return "White";
|
|
}
|
|
}
|
|
|
|
public enum Colors
|
|
{
|
|
LimeGreen,
|
|
Red,
|
|
Blue,
|
|
Fuchsia,
|
|
Orange,
|
|
Yellow,
|
|
Cyan,
|
|
Ivory,
|
|
Pink,
|
|
Indigo,
|
|
Purple,
|
|
Crimson
|
|
}
|
|
}
|