pull/5636/head
2dust 2024-08-30 13:15:25 +08:00
parent 79085af994
commit 9fdf6c6c32
2 changed files with 3 additions and 2 deletions

View File

@ -63,7 +63,7 @@ namespace ServiceLib.ViewModels
_noticeHandler?.Enqueue(ResUI.FillServerAddressCustom);
return;
}
SelectedSource.coreType = (ECoreType)Enum.Parse(typeof(ECoreType), CoreType);
SelectedSource.coreType = CoreType.IsNullOrEmpty() ? null : (ECoreType)Enum.Parse(typeof(ECoreType), CoreType);
if (ConfigHandler.EditCustomServer(_config, SelectedSource) == 0)
{

View File

@ -9,6 +9,7 @@ namespace ServiceLib.ViewModels
{
[Reactive]
public ProfileItem SelectedSource { get; set; }
[Reactive]
public string? CoreType { get; set; }
@ -82,7 +83,7 @@ namespace ServiceLib.ViewModels
return;
}
}
SelectedSource.coreType = (ECoreType)Enum.Parse(typeof(ECoreType), CoreType);
SelectedSource.coreType = CoreType.IsNullOrEmpty() ? null : (ECoreType)Enum.Parse(typeof(ECoreType), CoreType);
if (ConfigHandler.AddServer(_config, SelectedSource) == 0)
{