lixiaojun
2024-10-16 00f80abcfbf890ab3718d960550380389c64cea3
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -11,7 +11,7 @@
            InitializeComponent();
            this.PageTitle.Caption = "水力模拟";
            this.PageTitle.HeaderSvgImage = this.svgImg32[0];
            this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
        }
        private HStation.Vmo.XhsProjectVmo _project = null;//项目
@@ -66,8 +66,14 @@
            this.tabPageBimface.Controls.Clear();
            this.tabPageBimface.Controls.Add(bimfaceCtrl);
            await bimfaceCtrl.InitialData(_project, _projectSite, () => _hydroInfo);
            this.xhsProjectSimulationQ3dCtrl1.SetBindingData(_hydroInfo);
            this.xhsProjectSimulationPropertyCtrl1.InitialData(() => _hydroInfo);
            var q3dCtrl = GetQ3dCtrl();
            this.tabPageQ3d.Controls.Clear();
            this.tabPageQ3d.Controls.Add(q3dCtrl);
            q3dCtrl.InitialData(() => _hydroInfo);
            var propertyCtrl = GetPropertyCtrl();
            this.controlContainerRight.Controls.Clear();
            this.controlContainerRight.Controls.Add(propertyCtrl);
            propertyCtrl.InitialData(() => _hydroInfo);
        }
        #region Bimface
@@ -105,6 +111,7 @@
            }
            return _bimfaceCtrl;
        }
        //bimface控件
        private XhsProjectSimulationBimfaceCtrl _bimfaceCtrl = null;
@@ -169,29 +176,52 @@
            }
        }
        #endregion
        #endregion Bimface
        #region Q3d
        //点击事件
        private void xhsProjectSimulationQ3dCtrl1_ClickParterEvent(string code)
        //获取Q3d控件
        private XhsProjectSimulationQ3dCtrl GetQ3dCtrl()
        {
            if (_hydroInfo == null)
            if (_q3dCtrl == null)
            {
                return;
                _q3dCtrl = new XhsProjectSimulationQ3dCtrl();
                _q3dCtrl.Dock = DockStyle.Fill;
                _q3dCtrl.SelectedPartersChangedEvent += (obj) =>
                {
                    if (_hydroInfo == null)
                    {
                        return;
                    }
                    var allParterList = _hydroInfo.GetAllParters();
                    _parter = allParterList?.Find(x => x.Code == obj?.FirstOrDefault());
                    ShowProperty();
                };
            }
            var allParterList = _hydroInfo.GetAllParters();
            _parter = allParterList?.Find(x => x.Code == code);
            ShowProperty();
            return _q3dCtrl;
        }
        #endregion
        //Q3d控件
        private XhsProjectSimulationQ3dCtrl _q3dCtrl = null;
        #endregion Q3d
        #region 属性面板
        //获取属性控件
        private XhsProjectSimulationPropertyCtrl GetPropertyCtrl()
        {
            if (_propertyCtrl == null)
            {
                _propertyCtrl = new XhsProjectSimulationPropertyCtrl();
                _propertyCtrl.Dock = DockStyle.Fill;
            }
            return _propertyCtrl;
        }
        private XhsProjectSimulationPropertyCtrl _propertyCtrl = null;//属性控件
        #endregion
        #endregion 属性面板
        #region 自动匹配
@@ -230,6 +260,7 @@
            }
            return _matchingListCtrl;
        }
        //匹配列表控件
        private XhsProjectSimulationMatchingListCtrl _matchingListCtrl = null;
@@ -250,8 +281,7 @@
            this.docPnlBottom.Height = 350;
        }
        #endregion
        #endregion 自动匹配
        #region 未匹配列表
@@ -289,6 +319,7 @@
            }
            return _unMatchingListCtrl;
        }
        private XhsProjectSimulationUnMatchingListCtrl _unMatchingListCtrl = null;//未匹配列表
        //未匹配列表
@@ -307,9 +338,7 @@
            this.docPnlBottom.Height = 350;
        }
        #endregion
        #endregion 未匹配列表
        #region 一键显隐
@@ -339,7 +368,7 @@
            }
        }
        #endregion
        #endregion 一键显隐
        #region 水力校验
@@ -377,6 +406,7 @@
            }
            return _checkResultCtrl;
        }
        //校验结果控件
        private XhsProjectSimulationHydroCheckResultCtrl _checkResultCtrl = null;
@@ -397,7 +427,7 @@
            this.docPnlBottom.Height = 350;
        }
        #endregion
        #endregion 水力校验
        #region 保存水力信息
@@ -418,7 +448,7 @@
            TipFormHelper.ShowSucceed("保存成功!");
        }
        #endregion
        #endregion 保存水力信息
        #region 构件明细
@@ -444,6 +474,7 @@
            }
            return _parterListCtrl;
        }
        //构件明细控件
        private Yw.WinFrmUI.HydroParterListCtrl _parterListCtrl = null;
@@ -463,8 +494,7 @@
            this.docPnlBottom.Height = 350;
        }
        #endregion
        #endregion 构件明细
        #region INP导出
@@ -486,7 +516,7 @@
            TipFormHelper.ShowSucceed("导出成功");
        }
        #endregion
        #endregion INP导出
        #region 业务方法
@@ -500,11 +530,11 @@
            if (_parter == null)
            {
                this.xhsProjectSimulationPropertyCtrl1.SelectParter(null);
                _propertyCtrl?.SelectParter(null);
                return;
            }
            this.xhsProjectSimulationPropertyCtrl1.SelectParter(_parter.Code);
            _propertyCtrl?.SelectParter(_parter.Code);
            if (_calcuResult != null)
            {
                if (_calcuResult.Succeed)
@@ -535,15 +565,14 @@
                        if (calcuProperty != null)
                        {
                            this.xhsProjectSimulationPropertyCtrl1.UpdateCalcuProperty(calcuProperty);
                            _propertyCtrl?.UpdateCalcuProperty(calcuProperty);
                        }
                    }
                }
            }
        }
        #endregion
        #endregion 业务方法
        #region 配置
@@ -553,7 +582,7 @@
            this.rmSet.ShowPopup(MousePosition, true);
        }
        #endregion
        #endregion 配置
        #region 性能曲线
@@ -620,10 +649,9 @@
            dlg.ShowDialog();
        }
        #endregion
        #endregion 性能曲线
        #region 水力计算
        //获取计算控件
        private XhsProjectSimulationCalcuCtrl GetCalcuCtrl()
@@ -696,11 +724,11 @@
                            this.docPnlBottom.Height = 350;
                            TipFormHelper.ShowError("计算失败");
                        }
                    };
            }
            return _calcuCtrl;
        }
        private XhsProjectSimulationCalcuCtrl _calcuCtrl = null;//计算控件
        //水力计算
@@ -720,9 +748,7 @@
            this.docPnlBottom.Height = 350;
        }
        #endregion
        #endregion 水力计算
        #region 构件查询
@@ -759,6 +785,7 @@
            }
            return _searchCtrl;
        }
        private XhsProjectSimulationSearchCtrl _searchCtrl = null;//查询组件
        //查询
@@ -777,9 +804,7 @@
            this.docPnlBottom.Height = 350;
        }
        #endregion
        #endregion 构件查询
        #region 标注
@@ -851,6 +876,6 @@
            dlg.ShowDialog();
        }
        #endregion
        #endregion 标注
    }
}