2025-05-30 23:31:31 +08:00
|
|
|
|
using Serein.Library;
|
|
|
|
|
|
using Serein.Library.Api;
|
|
|
|
|
|
using Serein.Workbench.ViewModels;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
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.Views
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// CanvasNodeTreeView.xaml 的交互逻辑
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public partial class ViewCanvasInfoView : UserControl
|
|
|
|
|
|
{
|
|
|
|
|
|
private readonly ViewCanvasInfoViewModel ViewModel;
|
|
|
|
|
|
private readonly ViewNodeInfoViewModel NodeInfoViewModel;
|
|
|
|
|
|
public ViewCanvasInfoView()
|
|
|
|
|
|
{
|
|
|
|
|
|
this.ViewModel = App.GetService<ViewCanvasInfoViewModel>();
|
|
|
|
|
|
this.NodeInfoViewModel = App.GetService<ViewNodeInfoViewModel>();
|
|
|
|
|
|
this.DataContext = this.ViewModel;
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void Grid_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
|
|
|
|
{
|
2025-05-31 12:15:01 +08:00
|
|
|
|
if (sender is Grid grid && grid.DataContext is IFlowNode nodeModel)
|
2025-05-30 23:31:31 +08:00
|
|
|
|
{
|
|
|
|
|
|
NodeInfoViewModel.ViewNodeModel = nodeModel;
|
2025-07-04 21:31:07 +08:00
|
|
|
|
App.GetService<IFlowEnvironment>().FlowEdit.NodeLocate(nodeModel.Guid);
|
2025-05-30 23:31:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 定位节点
|
|
|
|
|
|
//if (e.ClickCount == 2)
|
|
|
|
|
|
//{
|
|
|
|
|
|
//}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|