mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Clean up nullability
This commit is contained in:
@@ -213,6 +213,14 @@ namespace MPF.Frontend
|
||||
|
||||
#region Convert to Short Name
|
||||
|
||||
/// <summary>
|
||||
/// Get the short string representation of the InterfaceLanguage enum values
|
||||
/// </summary>
|
||||
/// <param name="lang">InterfaceLanguage value to convert</param>
|
||||
/// <returns>String representing the value, if possible</returns>
|
||||
public static string ShortName(this InterfaceLanguage lang)
|
||||
=> ((InterfaceLanguage?)lang).ShortName();
|
||||
|
||||
/// <summary>
|
||||
/// Get the short string representation of the InterfaceLanguage enum values
|
||||
/// </summary>
|
||||
|
||||
@@ -145,13 +145,12 @@ namespace MPF.Frontend
|
||||
/// <summary>
|
||||
/// Default UI language to launch MPF into
|
||||
/// </summary>
|
||||
public InterfaceLanguage? DefaultUILanguage
|
||||
public InterfaceLanguage DefaultUILanguage
|
||||
{
|
||||
get
|
||||
{
|
||||
var valueString = GetStringSetting(Settings, "DefaultUILanguage", RedumpSystem.IBMPCcompatible.LongName());
|
||||
var valueEnum = (valueString ?? string.Empty).ToInterfaceLanguage();
|
||||
return valueEnum;
|
||||
var valueString = GetStringSetting(Settings, "DefaultUILanguage", InterfaceLanguage.AutoDetect.ShortName());
|
||||
return valueString.ToInterfaceLanguage();
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user