2025-03-14 16:04:06 +08:00
|
|
|
|
using Serein.Workbench.Node.ViewModel;
|
|
|
|
|
|
using Serein.Workbench.Tool;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Windows;
|
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
using System.Windows.Documents;
|
|
|
|
|
|
using System.Windows.Input;
|
|
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
|
|
using System.Windows.Navigation;
|
|
|
|
|
|
using System.Windows.Shapes;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Serein.Workbench.Node.View
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// UINodeControl.xaml 的交互逻辑
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class UINodeControl : NodeControlBase, INodeJunction
|
|
|
|
|
|
{
|
2025-05-30 01:02:25 +08:00
|
|
|
|
private new UINodeControlViewModel ViewModel { get; }
|
2025-03-14 16:04:06 +08:00
|
|
|
|
public UINodeControl()
|
|
|
|
|
|
{
|
2025-03-17 10:14:18 +08:00
|
|
|
|
base.ViewModel.IsEnabledOnView = true;
|
2025-05-30 23:31:31 +08:00
|
|
|
|
base.ViewModel.NodeModel.DisplayName = "[流程UI]";
|
2025-03-14 16:04:06 +08:00
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-07-30 21:15:07 +08:00
|
|
|
|
internal UINodeControl(UINodeControlViewModel viewModel) : base(viewModel)
|
2025-03-14 16:04:06 +08:00
|
|
|
|
{
|
2025-05-30 01:02:25 +08:00
|
|
|
|
ViewModel = viewModel;
|
2025-03-14 16:04:06 +08:00
|
|
|
|
DataContext = viewModel;
|
2025-05-30 23:31:31 +08:00
|
|
|
|
ViewModel.NodeModel.DisplayName = "[流程UI]";
|
2025-03-14 16:04:06 +08:00
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-30 21:15:07 +08:00
|
|
|
|
JunctionControlBase INodeJunction.ExecuteJunction => this.ExecuteJunctionControl;
|
2025-03-14 16:04:06 +08:00
|
|
|
|
|
2025-07-30 21:15:07 +08:00
|
|
|
|
JunctionControlBase INodeJunction.NextStepJunction => throw new NotImplementedException();
|
2025-03-14 16:04:06 +08:00
|
|
|
|
|
2025-07-30 21:15:07 +08:00
|
|
|
|
JunctionControlBase[] INodeJunction.ArgDataJunction => throw new NotImplementedException();
|
2025-03-14 16:04:06 +08:00
|
|
|
|
|
2025-07-30 21:15:07 +08:00
|
|
|
|
JunctionControlBase INodeJunction.ReturnDataJunction => throw new NotImplementedException();
|
2025-03-14 16:04:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void NodeControlBase_Loaded(object sender, RoutedEventArgs e)
|
|
|
|
|
|
{
|
2025-05-30 01:02:25 +08:00
|
|
|
|
//ViewModel.InitAdapter();
|
|
|
|
|
|
ViewModel.InitAdapter(userControl => {
|
2025-03-14 16:04:06 +08:00
|
|
|
|
EmbedContainer.Child = userControl;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void NodeControlBase_Initialized(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
UINodeControlViewModel vm = (UINodeControlViewModel)DataContext;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|