1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-10-16 14:10:45 +00:00
msfs-popout-panel-manager/DomainModel/Profile/PanelConfigColors.cs

39 lines
762 B
C#
Raw Permalink Normal View History

2023-07-12 22:41:31 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
namespace MSFSPopoutPanelManager.DomainModel.Profile
{
public class PanelConfigColors
{
public static string GetNextAvailableColor(List<PanelConfig> panelConfigs)
{
2024-02-28 02:44:21 +00:00
foreach (var colorName in Enum.GetNames<Colors>())
2023-07-12 22:41:31 +00:00
{
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
}
}