38 lines
990 B
C#
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;
|
|
}
|
|
}
|