port from perforce
This commit is contained in:
37
intromat/Intromat/ViewModels/Editors/EnumEditorViewModel.cs
Normal file
37
intromat/Intromat/ViewModels/Editors/EnumEditorViewModel.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user