25 lines
760 B
C#
25 lines
760 B
C#
using CommunityToolkit.Mvvm.Input;
|
|
using System.Windows.Input;
|
|
|
|
namespace Plugin.Cowain.Wcs.ViewModels.ProcessGraph;
|
|
|
|
public class PendingConnection6180ViewModel
|
|
{
|
|
private readonly ProcessEdit6180DialogViewModel _editor;
|
|
private ConnectorViewModel? _source;
|
|
|
|
public PendingConnection6180ViewModel(ProcessEdit6180DialogViewModel editor)
|
|
{
|
|
_editor = editor;
|
|
StartCommand = new RelayCommand<ConnectorViewModel>(source => _source = source);
|
|
FinishCommand = new RelayCommand<ConnectorViewModel>(target =>
|
|
{
|
|
if (target != null && _source != null)
|
|
_editor.Connect(_source, target);
|
|
});
|
|
}
|
|
|
|
public ICommand StartCommand { get; }
|
|
public ICommand FinishCommand { get; }
|
|
}
|