| | |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraEditors.Repository; |
| | | using DevExpress.XtraLayout.Utils; |
| | | using DevExpress.XtraRichEdit.Model; |
| | | using DevExpress.XtraVerticalGrid.Events; |
| | | |
| | | namespace Yw.WinFrmUI |
| | |
| | | { |
| | | InitializeComponent(); |
| | | this.layoutControl1.SetupLayoutControl(); |
| | | this.barBtnChangeLink.Visibility = BarItemVisibility.Never; |
| | | this.barBtnView.Visibility = BarItemVisibility.Never; |
| | | SetDescriptionVisible(false);//默认设置属性描述面板不显示 |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | 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> |
| | |
| | | this.propertyGridControl1.SelectedObject = value; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 重新从数据源中读取数据,外观恢复刚开始加载的样子 |
| | |
| | | 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; |
| | | } |
| | |
| | | var hydroFlowDirectionPropAttri = descriptor.Attributes[typeof(HydroFlowDirectionProAttribute)]; |
| | | if (hydroFlowDirectionPropAttri != null) |
| | | { |
| | | this.FlowDirectionPropertyValueChangedEvent?.Invoke(vm); |
| | | this.FlowEffectPropertyValueChangedEvent?.Invoke(vm); |
| | | } |
| | | } |
| | | } |