upload
This commit is contained in:
commit
1c7a8cf25f
579 files changed
+83196
No files matched your search
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
|
||||
namespace VibranceHud.Design;
|
||||
|
||||
public static class Chromes
|
||||
{
|
||||
public static string Name(Chrome chrome)
|
||||
{
|
||||
return chrome.ToString();
|
||||
}
|
||||
|
||||
public static Chrome Parse(string? stored)
|
||||
{
|
||||
string text = (stored ?? "").Trim();
|
||||
if (text.Length == 0 || char.IsDigit(text[0]) || text[0] == '-')
|
||||
{
|
||||
return Chrome.Plexus;
|
||||
}
|
||||
if (text.Contains(','))
|
||||
{
|
||||
return Chrome.Plexus;
|
||||
}
|
||||
if (!Enum.TryParse<Chrome>(text, ignoreCase: true, out var result) || !Enum.IsDefined(result))
|
||||
{
|
||||
return Chrome.Plexus;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user