1. 重新设计了Generate项目及相关特性的命名,避免与其他类型混淆。

2. 补充了部分注释。
3. 修改了删除容器节点时,容器内子节点未正确删除的问题。
This commit is contained in:
fengjiayi
2025-07-30 21:15:07 +08:00
parent 93148b11a5
commit 152077e9b5
188 changed files with 2713 additions and 1406 deletions

View File

@@ -42,8 +42,12 @@ namespace Serein.Workbench.Customs
/// </summary>
public partial class FlowMethodInfoListBox : UserControl, System.ComponentModel.INotifyPropertyChanged
{
private object viewMethodInfo;
public object ViewMethodInfo
private object? viewMethodInfo;
/// <summary>
/// 当前选中的方法信息
/// </summary>
public object? ViewMethodInfo
{
get => viewMethodInfo;
set
@@ -56,27 +60,44 @@ namespace Serein.Workbench.Customs
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
/// <summary>
/// 属性改变事件用于通知绑定的UI更新
/// </summary>
public event System.ComponentModel.PropertyChangedEventHandler? PropertyChanged;
/// <summary>
/// FlowMethodInfoListBox 的构造函数
/// </summary>
public FlowMethodInfoListBox()
{
InitializeComponent();
}
/// <summary>
/// 依赖属性,用于绑定方法信息列表
/// </summary>
public static readonly DependencyProperty ItemsSourceProperty =
DependencyProperty.Register(nameof(ItemsSource), typeof(IEnumerable), typeof(FlowMethodInfoListBox), new PropertyMetadata(null));
/// <summary>
/// 获取或设置方法信息列表
/// </summary>
public IEnumerable ItemsSource
{
get => (IEnumerable)GetValue(ItemsSourceProperty);
set => SetValue(ItemsSourceProperty, value);
}
public static readonly DependencyProperty BackgroundProperty =
/// <summary>
/// 依赖属性,用于设置背景颜色
/// </summary>
public new static readonly DependencyProperty BackgroundProperty =
DependencyProperty.Register(nameof(Background), typeof(Brush), typeof(FlowMethodInfoListBox), new PropertyMetadata(Brushes.Transparent));
public Brush Background
/// <summary>
/// 获取或设置背景颜色
/// </summary>
public new Brush Background
{
get => (Brush)GetValue(BackgroundProperty);
set => SetValue(BackgroundProperty, value);