port from perforce
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using Intromat.Model.Compiler;
|
||||
using Intromat.Views.Previews;
|
||||
using NodeNetwork.ViewModels;
|
||||
using ReactiveUI;
|
||||
using Splat;
|
||||
|
||||
namespace Intromat.ViewModels.Previews
|
||||
{
|
||||
public class DxMeshPreviewViewModel : NodePreviewViewModelBase
|
||||
{
|
||||
static DxMeshPreviewViewModel()
|
||||
{
|
||||
Locator.CurrentMutable.Register(() => new DxMeshPreview(), typeof(IViewFor<DxMeshPreviewViewModel>));
|
||||
}
|
||||
|
||||
public DxMeshPreviewViewModel(NodeViewModel parent, IObservable<MeshValue?> textureValue)
|
||||
{
|
||||
MeshValue = textureValue;
|
||||
Parent = parent;
|
||||
}
|
||||
|
||||
public IObservable<MeshValue?> MeshValue { get; }
|
||||
|
||||
public NodeViewModel Parent { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using Intromat.Model.Compiler;
|
||||
using Intromat.Views.Previews;
|
||||
using NodeNetwork.ViewModels;
|
||||
using ReactiveUI;
|
||||
using Splat;
|
||||
|
||||
namespace Intromat.ViewModels.Previews
|
||||
{
|
||||
public class DxTexturePreviewViewModel : NodePreviewViewModelBase
|
||||
{
|
||||
static DxTexturePreviewViewModel()
|
||||
{
|
||||
Locator.CurrentMutable.Register(() => new DxTexturePreview(), typeof(IViewFor<DxTexturePreviewViewModel>));
|
||||
}
|
||||
|
||||
public DxTexturePreviewViewModel(NodeViewModel parent, IObservable<TextureValue?> textureValue)
|
||||
{
|
||||
TextureValue = textureValue;
|
||||
Parent = parent;
|
||||
}
|
||||
|
||||
public IObservable<TextureValue?> TextureValue { get; }
|
||||
|
||||
public NodeViewModel Parent { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Intromat.ViewModels.Previews
|
||||
{
|
||||
public abstract class NodePreviewViewModelBase : ReactiveObject
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Intromat.Views.Previews;
|
||||
using ReactiveUI;
|
||||
using Splat;
|
||||
|
||||
namespace Intromat.ViewModels.Previews
|
||||
{
|
||||
public class StringPreviewViewModel : NodePreviewViewModelBase
|
||||
{
|
||||
private string _value = string.Empty;
|
||||
|
||||
static StringPreviewViewModel()
|
||||
{
|
||||
Locator.CurrentMutable.Register(() => new StringPreview(), typeof(IViewFor<StringPreviewViewModel>));
|
||||
}
|
||||
|
||||
public string Value
|
||||
{
|
||||
get => _value;
|
||||
set => this.RaiseAndSetIfChanged(ref _value, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user