恢复WPF项目代码

This commit is contained in:
fengjiayi
2025-01-05 08:52:37 +08:00
parent 176e43f834
commit 652707f980
73 changed files with 10202 additions and 1 deletions

View File

@@ -0,0 +1,51 @@
using Serein.Library;
using Serein.NodeFlow.Model;
using Serein.Workbench.Node.View;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace Serein.Workbench.Node.ViewModel
{
public class GlobalDataNodeControlViewModel : NodeControlViewModelBase
{
private SingleGlobalDataNode NodeModel => (SingleGlobalDataNode)base.NodeModel;
/// <summary>
/// 复制全局数据表达式
/// </summary>
public ICommand CommandCopyDataExp { get; }
/// <summary>
/// 刷新数据
/// </summary>
public ICommand CommandRefreshData { get; }
public GlobalDataNodeControlViewModel(SingleGlobalDataNode node) : base(node)
{
CommandCopyDataExp = new RelayCommand( o =>
{
string exp = NodeModel.KeyName;
string copyValue = $"@Get #{exp}#";
Clipboard.SetDataObject(copyValue);
});
}
/// <summary>
/// 自定义参数值
/// </summary>
public string? KeyName
{
get => NodeModel?.KeyName;
set { NodeModel.KeyName = value; OnPropertyChanged(); }
}
}
}