lixiaojun
2024-09-27 97c4b1bc4ca88c5487f8ae38a0da32c93b66c4ce
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/05-function/XhsProjectSimulationFunctionMgrCtrl.cs
@@ -1,4 +1,6 @@
namespace HStation.WinFrmUI
using DevExpress.Utils.Svg;
namespace HStation.WinFrmUI
{
    public partial class XhsProjectSimulationFunctionMgrCtrl : DevExpress.XtraEditors.XtraUserControl
    {
@@ -7,9 +9,66 @@
            InitializeComponent();
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData()
        {
            this.ShowXhsProjectInfoEvent?.Invoke(this.svgImg32[0]);
        }
        /// <summary>
        /// 显示循环水项目信息事件
        /// </summary>
        public event Action<SvgImage> ShowXhsProjectInfoEvent;
        /// <summary>
        /// 显示循环水项目水力模拟事件
        /// </summary>
        public event Action<SvgImage> ShowXhsProjectSimulationEvent;
        /// <summary>
        /// 创建循环水项目方案事件
        /// </summary>
        public event Action<SvgImage> CreateXhsProjectSchemeEvent;
        /// <summary>
        /// 比较循环水项目方案事件
        /// </summary>
        public event Action<SvgImage> CompareXhsProjectSchemeEvent;
        //元素点击事件
        private void accordionControl1_ElementClick(object sender, DevExpress.XtraBars.Navigation.ElementClickEventArgs e)
        {
            var tag = e.Element.Tag?.ToString();
            switch (tag)
            {
                case "info":
                    {
                        this.ShowXhsProjectInfoEvent?.Invoke(this.svgImg32[0]);
                    }
                    break;
                case "simulation":
                    {
                        this.ShowXhsProjectSimulationEvent?.Invoke(this.svgImg32[1]);
                    }
                    break;
                case "scheme-create":
                    {
                        this.CreateXhsProjectSchemeEvent?.Invoke(this.svgImg32[3]);
                    }
                    break;
                case "scheme-compare":
                    {
                        this.CompareXhsProjectSchemeEvent?.Invoke(this.svgImg32[4]);
                    }
                    break;
                default: break;
            }
        }
    }
}