Repository navigation
Expand file tree
/
Copy pathGroupNodeViewModel.cs
More file actions
56 lines (51 loc) · 1.62 KB
/
Copy pathGroupNodeViewModel.cs
File metadata and controls
56 lines (51 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Text;
using System.Threading.Tasks;
using DynamicData;
using ExampleCodeGenApp.Model;
using ExampleCodeGenApp.Model.Compiler;
using ExampleCodeGenApp.ViewModels.Editors;
using ExampleCodeGenApp.Views;
using NodeNetwork.Toolkit.Group.AddEndpointDropPanel;
using NodeNetwork.Toolkit.ValueNode;
using NodeNetwork.ViewModels;
using ReactiveUI;
namespace ExampleCodeGenApp.ViewModels.Nodes
{
public class GroupNodeViewModel : CodeGenNodeViewModel
{
static GroupNodeViewModel()
{
Splat.Locator.CurrentMutable.Register(() => new GroupNodeView(), typeof(IViewFor<GroupNodeViewModel>));
}
public NetworkViewModel Subnet { get; }
#region IOBinding
public CodeNodeGroupIOBinding IOBinding
{
get => _ioBinding;
set
{
if (_ioBinding != null)
{
throw new InvalidOperationException("IOBinding is already set.");
}
_ioBinding = value;
AddEndpointDropPanelVM = new AddEndpointDropPanelViewModel
{
NodeGroupIOBinding = IOBinding
};
}
}
private CodeNodeGroupIOBinding _ioBinding;
#endregion
public AddEndpointDropPanelViewModel AddEndpointDropPanelVM { get; private set; }
public GroupNodeViewModel(NetworkViewModel subnet) : base(NodeType.Group)
{
this.Name = "Group";
this.Subnet = subnet;
}
}
}