Files
bluflame/intromat/Intromat/ViewModels/Editors/EnumEditorViewModel.cs
2026-04-18 22:31:51 +02:00

38 lines
990 B
C#

using System;
using Intromat.Interfaces;
using Intromat.Nodes.Code;
using Intromat.Views.Editors;
using NodeNetwork.Toolkit.ValueNode;
using ReactiveUI;
using Splat;
namespace Intromat.ViewModels.Editors
{
public class EnumEditorViewModel : ValueEditorViewModel<int>, IExpressionEditor
{
static EnumEditorViewModel()
{
Locator.CurrentMutable.Register(() => new EnumEditorView(), typeof(IViewFor<EnumEditorViewModel>));
}
public EnumEditorViewModel(Type enumType)
{
EnumType = enumType;
}
public Type EnumType { get; }
public ERelativeSource RelativeSource
{
get => ERelativeSource.Custom;
set => throw new NotSupportedException();
}
public bool HasParentSource => false;
public bool HasInputSource => false;
public CodeGenPortViewModel CodeGenPort => (CodeGenPortViewModel)Parent.Port;
}
}