28 lines
815 B
C#
28 lines
815 B
C#
using System;
|
|
using System.Reactive;
|
|
using System.Reactive.Linq;
|
|
using DynamicData;
|
|
using Intromat.ViewModels;
|
|
using NodeNetwork.Toolkit.ValueNode;
|
|
using NodeNetwork.ViewModels;
|
|
|
|
namespace Intromat.Nodes
|
|
{
|
|
public abstract class DxNodeBase : CodeGenNodeViewModel
|
|
{
|
|
protected DxNodeBase()
|
|
: base(NodeType.Literal)
|
|
{
|
|
AnyInputChanged = Inputs
|
|
.Connect()
|
|
.Filter(input => input is ValueNodeInputViewModelBase)
|
|
.WhenValueChanged(input => ((ValueNodeInputViewModelBase)input).UnitValueChanged)
|
|
.SelectMany(i => i!);
|
|
|
|
AnyInputChanged.Subscribe(_ => { });
|
|
Resizable = ResizeOrientation.HorizontalAndVertical;
|
|
}
|
|
|
|
public IObservable<Unit> AnyInputChanged { get; }
|
|
}
|
|
} |