Skip to content

Commit 612a0a0

Browse files
authored
Add NodifyNodes.cs to ViewModels
1 parent 1d50c6a commit 612a0a0

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

WPF/ViewModels/NodifyNodes.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using CommunityToolkit.Mvvm.ComponentModel;
2+
using System.Collections.ObjectModel;
3+
using System.Windows;
4+
using System.Windows.Media;
5+
6+
namespace Graph_Database_WPF.ViewModels
7+
{
8+
public partial class ConnectorViewModel : ObservableObject
9+
{
10+
[ObservableProperty] private string _title;
11+
[ObservableProperty] private Point _anchor;
12+
public NodeViewModel ParentNode { get; set; }
13+
}
14+
15+
public partial class NodeViewModel : ObservableObject
16+
{
17+
[ObservableProperty] private Point _location;
18+
[ObservableProperty] private string _id;
19+
[ObservableProperty] private string _title;
20+
[ObservableProperty] private Brush _color;
21+
22+
public ObservableCollection<ConnectorViewModel> Inputs { get; } = new();
23+
public ObservableCollection<ConnectorViewModel> Outputs { get; } = new();
24+
}
25+
26+
public partial class ConnectionViewModel : ObservableObject
27+
{
28+
[ObservableProperty] private ConnectorViewModel _source;
29+
[ObservableProperty] private ConnectorViewModel _target;
30+
}
31+
}

WPF/ViewModels/ViewModelBase.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)