lixiaojun
2024-11-20 74dba39c95f8120bb31a64739c872cb43790935c
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-property/HydroVisualPropertyCtrl.cs
@@ -3,7 +3,6 @@
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraEditors.Repository;
using DevExpress.XtraLayout.Utils;
using DevExpress.XtraRichEdit.Model;
using DevExpress.XtraVerticalGrid.Events;
namespace Yw.WinFrmUI
@@ -15,9 +14,6 @@
        {
            InitializeComponent();
            this.layoutControl1.SetupLayoutControl();
            this.barBtnChangeLink.Visibility = BarItemVisibility.Never;
            this.barBtnView.Visibility = BarItemVisibility.Never;
            SetDescriptionVisible(false);//默认设置属性描述面板不显示
        }
        /// <summary>
@@ -56,25 +52,21 @@
        public event Action<HydroVisualViewModel> GradingPropertyValueChangedEvent;
        /// <summary>
        /// 流向属性值改变事件
        /// 水流动画属性值改变事件
        /// </summary>
        public event Action<HydroVisualViewModel> FlowDirectionPropertyValueChangedEvent;
        public event Action<HydroVisualViewModel> FlowEffectPropertyValueChangedEvent;
        /// <summary>
        /// 强调连接组件事件
        /// 强调连接节点事件
        /// 第一个参数为本身Code
        /// 第二个参数为连接Code
        /// 第二个参数为连接节点Code
        /// </summary>
        public event Action<string, string> BlinkLinkParterEvent;
        public event Action<HydroLinkViewModel, string> BlinkLinkNodeEvent;
        /// <summary>
        /// 查看构件事件
        /// </summary>
        public event Action<HydroVisualViewModel> HydroViewEvent;
        /// <summary>
@@ -94,8 +86,6 @@
                this.propertyGridControl1.SelectedObject = value;
            }
        }
        /// <summary>
        /// 重新从数据源中读取数据,外观恢复刚开始加载的样子
@@ -573,7 +563,8 @@
                    buttonEdit.ButtonClick += delegate
                    {
                        var vm = GetPropertyViewModel(e.Row);
                        this.BlinkLinkParterEvent?.Invoke(vm.Code, e.Row.Properties.Value.ToString());
                        var vmLink = vm as HydroLinkViewModel;
                        this.BlinkLinkNodeEvent?.Invoke(vmLink, e.Row.Properties.Value.ToString());
                    };
                    e.RepositoryItem = buttonEdit;
                }
@@ -617,7 +608,7 @@
                var hydroFlowDirectionPropAttri = descriptor.Attributes[typeof(HydroFlowDirectionProAttribute)];
                if (hydroFlowDirectionPropAttri != null)
                {
                    this.FlowDirectionPropertyValueChangedEvent?.Invoke(vm);
                    this.FlowEffectPropertyValueChangedEvent?.Invoke(vm);
                }
            }
        }