first commit

This commit is contained in:
2025-07-06 00:23:46 +02:00
commit 38f50c8819
1788 changed files with 112878 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using System.Reflection;
using Avalonia.Collections;
using NitroxModel.Serialization;
namespace Nitrox.Launcher.Models.Design;
public record EditorField
{
public object Value { get; set; }
public PropertyInfo PropertyInfo { get; init; }
public AvaloniaList<object> PossibleValues { get; set; }
public string Description
{
get
{
string description = PropertyInfo.GetCustomAttribute<PropertyDescriptionAttribute>()?.Description;
if (string.IsNullOrWhiteSpace(description))
{
description = null;
}
return description;
}
}
public EditorField(PropertyInfo propertyInfo, object value, AvaloniaList<object> possibleValues)
{
PropertyInfo = propertyInfo;
Value = value;
PossibleValues = possibleValues;
}
}