| | |
| | | RegistBulkSetEvents(); |
| | | } |
| | | |
| | | |
| | | |
| | | #region 模型事件 |
| | | |
| | | /// <summary> |
| | | /// 获取模型事件 |
| | | /// </summary> |
| | | public event Func<XhsSchemeVmo, Task<Yw.Model.HydroModelInfo>> GetModelEvent; |
| | | |
| | | /// <summary> |
| | | /// 刷新模型事件 |
| | | /// </summary> |
| | | public event Func<Task<Yw.Model.HydroModelInfo>> RefreshModelEvent; |
| | | |
| | | #endregion |
| | | #endregion 模型事件 |
| | | |
| | | #region 方案事件 |
| | | |
| | |
| | | /// 更新方案事件 |
| | | /// </summary> |
| | | public event Action<XhsSchemeVmo> UpdateSchemeEvent; |
| | | |
| | | /// <summary> |
| | | /// 移除方案事件 |
| | | /// </summary> |
| | | public event Action<XhsSchemeVmo> RemoveSchemeEvent; |
| | | |
| | | #endregion |
| | | #endregion 方案事件 |
| | | |
| | | #region 工况事件 |
| | | |
| | |
| | | /// 新增工况事件 |
| | | /// </summary> |
| | | public event Action<HydroWorkingVmo> AppendWorkingEvent; |
| | | |
| | | /// <summary> |
| | | /// 更新工况事件 |
| | | /// </summary> |
| | | public event Action<HydroWorkingVmo> UpdateWorkingEvent; |
| | | |
| | | /// <summary> |
| | | /// 移除工况事件 |
| | | /// </summary> |
| | | public event Action<HydroWorkingVmo> RemoveWorkingEvent; |
| | | |
| | | /// <summary> |
| | | /// 重载工况事件 |
| | | /// </summary> |
| | | public event Action<Dictionary<HydroWorkingVmo, bool>> ReloadWorkingEvent; |
| | | |
| | | #endregion |
| | | #endregion 工况事件 |
| | | |
| | | private HStation.Vmo.XhsProjectVmo _project = null;//项目 |
| | | private HStation.Vmo.XhsProjectSiteVmo _projectSite = null;//项目站 |
| | |
| | | return helper.GetPropStatusDbList(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 属性状态 |
| | | |
| | | #region 更改状态 |
| | | |
| | |
| | | return helper.GetRemoveParters(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 更改状态 |
| | | |
| | | #region BIM控件 |
| | | |
| | |
| | | this.tabPageBimface.Controls.Add(bimfaceCtrl); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion BIM控件 |
| | | |
| | | #region Q3d控件 |
| | | |
| | |
| | | this.tabPageQ3d.Controls.Add(q3dCtrl); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion Q3d控件 |
| | | |
| | | #region 属性控件 |
| | | |
| | |
| | | _propertyCtrl?.UpdateRows(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 属性控件 |
| | | |
| | | #region 选择构件 |
| | | |
| | |
| | | return helper.GetSourceList(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 可见列表 |
| | | |
| | | #region 视图列表 |
| | | |
| | |
| | | return helper.GetVisual(code); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 视图列表 |
| | | |
| | | #region 明细控件 |
| | | |
| | |
| | | ShowVisualListCtrl(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 明细控件 |
| | | |
| | | #region 构件显示 |
| | | |
| | |
| | | |
| | | #endregion 构件显示 |
| | | |
| | | #endregion |
| | | #endregion 构件明细 |
| | | |
| | | #region 一键显隐 |
| | | |
| | |
| | | |
| | | //保存锁定对象 |
| | | private object _locker_save = new(); |
| | | |
| | | private bool _isSaving = false;//正在保存 |
| | | |
| | | //保存 |
| | |
| | | |
| | | var bol = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance |
| | | .Update(_hydroInfo, addParterList, updateParterList, removeParters); |
| | | |
| | | if (!bol) |
| | | { |
| | | WaitFormHelper.HideWaitForm(); |
| | |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 批量配置 |
| | | |
| | | #region 构件查询 |
| | | |
| | |
| | | markHelper.Set(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 模型标注 |
| | | |
| | | #region 颜色分级 |
| | | |
| | |
| | | gradingHelper.Set(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 颜色分级 |
| | | |
| | | #region 人工刷新 |
| | | |
| | |
| | | UpdatePropertyCtrl(); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | #endregion 压力切换 |
| | | |
| | | #region 评价规则 |
| | | |
| | |
| | | ShowEvaluationDlg(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 评价规则 |
| | | |
| | | #region 水力计算 |
| | | |
| | |
| | | Calcu(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 水力计算 |
| | | |
| | | #region 导出报告 |
| | | |
| | | private async void barBtnExportWord_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | //创建打印信息 |
| | | private async Task<SimulationPrintViewModel> CreatePrintInfo() |
| | | { |
| | | if (_visual == null) |
| | | if (_project == null) |
| | | { |
| | | SelectInputSource(); |
| | | if (_visual == null) |
| | | return default; |
| | | } |
| | | if (_hydroInfo == null) |
| | | { |
| | | return default; |
| | | } |
| | | |
| | | #region 工况列表 |
| | | |
| | | var allWorkingList = GetCheckedWorkingList(); |
| | | if (allWorkingList == null || allWorkingList.Count < 1) |
| | | { |
| | | var working = GetWorking(); |
| | | if (working == null) |
| | | { |
| | | TipFormHelper.ShowWarn("请选择构件后重试!"); |
| | | return; |
| | | TipFormHelper.ShowWarn("请计算或选择工况后重试!"); |
| | | return default; |
| | | } |
| | | allWorkingList = new List<HydroWorkingVmo>() { working }; |
| | | } |
| | | HydroVisualInfo visual = _visual; |
| | | if (_visual is HydroLinkInfo linkInfo) |
| | | |
| | | #endregion 工况列表 |
| | | |
| | | #region 选择节点 |
| | | |
| | | var selectedNode = GetSelectNode(); |
| | | if (selectedNode == null) |
| | | { |
| | | var visualListHelper = GetVisualListHelper(); |
| | | visual = visualListHelper.GetVisual(linkInfo.StartCode); |
| | | return default; |
| | | } |
| | | |
| | | #endregion 选择节点 |
| | | |
| | | var vm = new SimulationPrintViewModel(); |
| | | |
| | | #region 项目 |
| | | |
| | | vm.Project = new SimulationPrintProjectViewModel(_project); |
| | | if (_hydroInfo == null) |
| | | { |
| | | return vm; |
| | | } |
| | | |
| | | #endregion 项目 |
| | | |
| | | #region 水泵列表 |
| | | |
| | | vm.PumpList = _hydroInfo.Pumps?.Select(x => |
| | | { |
| | | var pump = new SimulationPrintPumpViewModel(x); |
| | | return pump; |
| | | }).ToList(); |
| | | |
| | | #endregion 水泵列表 |
| | | |
| | | #region 附加信息 |
| | | |
| | | var allMonitorList = await GetMonitorList(); |
| | | var working = GetWorking(); |
| | | var calcuResult = GetCalcuResult(); |
| | | var allEvaluationList = await GetEvaluationList(); |
| | | |
| | | var dlg = new SimulationWorkingReportDlg(); |
| | | dlg.ReloadDataEvent += (vm) => |
| | | #endregion 附加信息 |
| | | |
| | | #region 基础模型 |
| | | |
| | | var baseHydroInfo = _hydroInfo; |
| | | if (_scheme != null) |
| | | { |
| | | var fileName = FileDialogHelper.SaveWordDoc("导出Word报告"); |
| | | if (string.IsNullOrEmpty(fileName)) |
| | | baseHydroInfo = await GetModelEvent?.Invoke(null); |
| | | } |
| | | var baseHydroInfoRhs = baseHydroInfo.Adapt<Yw.Model.HydroModelInfo>(); |
| | | |
| | | #endregion 基础模型 |
| | | |
| | | #region 遍历工况 |
| | | |
| | | vm.WorkingList = new List<SimulationPrintWorkingViewModel>(); |
| | | foreach (var working in allWorkingList) |
| | | { |
| | | baseHydroInfoRhs.UpdateWorkingInfo(working.WorkingInfo); |
| | | var calcuResult = baseHydroInfoRhs.Calcu(Yw.EPAnet.CalcuMode.MinorLoss, _calcuPressModeIsHead, allEvaluationList); |
| | | |
| | | var printWorking = new SimulationPrintWorkingViewModel(working); |
| | | vm.WorkingList.Add(printWorking); |
| | | |
| | | //精度评估 |
| | | printWorking.Accuracy = SimulationPrintAccuracyHelper.Create(baseHydroInfoRhs, allMonitorList, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //水泵分析 |
| | | printWorking.PumpAnaly = SimulationPrintPumpAnalyHelper.Create(baseHydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //监测分析 |
| | | printWorking.MonitorAnaly = SimulationPrintMonitorAnalyHelper.Create(baseHydroInfoRhs, allMonitorList, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //能耗分析 |
| | | printWorking.EnergyAnaly = HydroEnergyAnalyHelper.Create(baseHydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //损失统计 |
| | | printWorking.LossStatistics = HydroLossStatisticsHelper.Create(baseHydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //损失曲线 |
| | | printWorking.LossCurve = HydroLossCurveHelper.Create(baseHydroInfoRhs, working, selectedNode, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | } |
| | | |
| | | #endregion 遍历工况 |
| | | |
| | | #region 方案处理 |
| | | |
| | | if (_scheme != null) |
| | | { |
| | | var hydroInfo = _hydroInfo; |
| | | var hydroInfoRhs = hydroInfo.Adapt<Yw.Model.HydroModelInfo>(); |
| | | vm.Scheme = new SimulationPrintSchemeViewModel(_scheme); |
| | | foreach (var working in allWorkingList) |
| | | { |
| | | return; |
| | | hydroInfoRhs.UpdateWorkingInfo(working.WorkingInfo); |
| | | var calcuResult = hydroInfoRhs.Calcu(Yw.EPAnet.CalcuMode.MinorLoss, _calcuPressModeIsHead, allEvaluationList); |
| | | |
| | | var printWorking = new SimulationPrintWorkingViewModel(working); |
| | | vm.Scheme.WorkingList.Add(printWorking); |
| | | |
| | | //精度评估 |
| | | printWorking.Accuracy = SimulationPrintAccuracyHelper.Create(hydroInfoRhs, allMonitorList, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //水泵分析 |
| | | printWorking.PumpAnaly = SimulationPrintPumpAnalyHelper.Create(hydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //监测分析 |
| | | printWorking.MonitorAnaly = SimulationPrintMonitorAnalyHelper.Create(hydroInfoRhs, allMonitorList, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //能耗分析 |
| | | printWorking.EnergyAnaly = HydroEnergyAnalyHelper.Create(hydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //损失统计 |
| | | printWorking.LossStatistics = HydroLossStatisticsHelper.Create(hydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | //损失曲线 |
| | | printWorking.LossCurve = HydroLossCurveHelper.Create(hydroInfoRhs, working, selectedNode, calcuResult, _calcuPressModeIsHead, allEvaluationList); |
| | | } |
| | | var reportHelper = new HStation.ReportFile.SimulationWorkingReportHelper(); |
| | | reportHelper.Create(fileName, vm); |
| | | TipFormHelper.ShowInfo("导出成功!"); |
| | | }; |
| | | dlg.SetBindingData(_project, _hydroInfo, allMonitorList, working, calcuResult, visual); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | #endregion 方案处理 |
| | | |
| | | return vm; |
| | | } |
| | | |
| | | #endregion |
| | | //导出word |
| | | private async void barBtnExportWord_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var printInfo = await CreatePrintInfo(); |
| | | var printDlg = new HStation.WinFrmUI.XtraForm1(); |
| | | printDlg.SetBindingData(printInfo); |
| | | printDlg.ShowDialog(); |
| | | /* if (_visual == null) |
| | | { |
| | | SelectInputSource(); |
| | | if (_visual == null) |
| | | { |
| | | TipFormHelper.ShowWarn("请选择构件后重试!"); |
| | | return; |
| | | } |
| | | } |
| | | HydroVisualInfo visual = _visual; |
| | | if (_visual is HydroLinkInfo linkInfo) |
| | | { |
| | | var visualListHelper = GetVisualListHelper(); |
| | | visual = visualListHelper.GetVisual(linkInfo.StartCode); |
| | | } |
| | | |
| | | var allMonitorList = await GetMonitorList(); |
| | | var working = GetWorking(); |
| | | var calcuResult = GetCalcuResult(); |
| | | |
| | | var dlg = new SimulationWorkingReportDlg(); |
| | | dlg.ReloadDataEvent += (vm) => |
| | | { |
| | | var fileName = FileDialogHelper.SaveWordDoc("导出Word报告"); |
| | | if (string.IsNullOrEmpty(fileName)) |
| | | { |
| | | return; |
| | | } |
| | | var reportHelper = new HStation.ReportFile.SimulationWorkingReportHelper(); |
| | | reportHelper.Create(fileName, vm); |
| | | TipFormHelper.ShowInfo("导出成功!"); |
| | | }; |
| | | dlg.SetBindingData(_project, _hydroInfo, allMonitorList, working, calcuResult, visual); |
| | | dlg.ShowDialog();*/ |
| | | } |
| | | |
| | | #endregion 导出报告 |
| | | |
| | | #region 当前工况 |
| | | |
| | |
| | | AddWorking(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 当前工况 |
| | | |
| | | #region 选择工况 |
| | | |
| | |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 选择工况 |
| | | |
| | | #region 监测分析 |
| | | |
| | |
| | | ShowMonitorAnalyListCtrl(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 监测分析 |
| | | |
| | | #region 工况分析 |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //获取选择节点 |
| | | private HydroNodeInfo GetSelectNode() |
| | | { |
| | | if (_visual == null) |
| | | { |
| | | SelectInputSource(); |
| | | if (_visual == null) |
| | | { |
| | | TipFormHelper.ShowWarn("请选择构件后重试!"); |
| | | return null; |
| | | } |
| | | } |
| | | HydroVisualInfo visual = _visual; |
| | | if (_visual is HydroLinkInfo linkInfo) |
| | | { |
| | | var visualListHelper = GetVisualListHelper(); |
| | | visual = visualListHelper.GetVisual(linkInfo.StartCode); |
| | | } |
| | | return visual as HydroNodeInfo; |
| | | } |
| | | |
| | | //精度评估 |
| | |
| | | } |
| | | |
| | | //能效分析 |
| | | private async void barBtnWorkingPower_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | private async void barBtnEnergyAnaly_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var allMonitorList = await GetMonitorList(); |
| | | var workingCheckedListHelper = GetWorkingCheckedListHelper(); |
| | | var allCheckedWorkingList = workingCheckedListHelper.GetCheckedWorkingList(); |
| | | if (allCheckedWorkingList == null || allCheckedWorkingList.Count < 1) |
| | | if (_hydroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var isHead = _calcuPressModeIsHead; |
| | | var allEvaluationList = await GetEvaluationList(); |
| | | |
| | | var workingList = GetCheckedWorkingList(); |
| | | if (workingList == null || workingList.Count < 1) |
| | | { |
| | | var workingHelper = GetWorkingHelper(); |
| | | if (!workingHelper.Initialized) |
| | |
| | | TipFormHelper.ShowWarn("请计算后重试!"); |
| | | return; |
| | | } |
| | | var dlg = new SimulationSingleWorkingEnergyDlg(); |
| | | dlg.SetBindingData(workingHelper.Working, workingHelper.HydroInfo, allMonitorList, workingHelper.CalcuResult); |
| | | var dlg = new SimulationEnergyAnalyDlg(); |
| | | dlg.SetBindingData(workingHelper.HydroInfo, workingHelper.Working, workingHelper.CalcuResult, isHead, allEvaluationList); |
| | | dlg.ShowDialog(); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | var dlg = new SimulationMultiWorkingEnergyDlg(); |
| | | dlg.SetBindingData(_hydroInfo, allMonitorList, allCheckedWorkingList); |
| | | dlg.ShowDialog(); |
| | | } |
| | | var workingDlg = new SimulationEnergyAnalyWorkingDlg(); |
| | | workingDlg.SetBindingData(_hydroInfo, workingList, isHead, allEvaluationList); |
| | | workingDlg.ShowDialog(); |
| | | } |
| | | |
| | | //损失统计 |
| | | private void barBtnWorkingLossStatistics_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | private async void barBtnWorkingLossStatistics_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var workingCheckedListHelper = GetWorkingCheckedListHelper(); |
| | | var allCheckedWorkingList = workingCheckedListHelper.GetCheckedWorkingList(); |
| | | if (allCheckedWorkingList == null || allCheckedWorkingList.Count < 1) |
| | | if (_hydroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | var hydroInfo = _hydroInfo.Adapt<Yw.Model.HydroModelInfo>(); |
| | | var isHead = _calcuPressModeIsHead; |
| | | var allEvaluationList = await GetEvaluationList(); |
| | | |
| | | var workingList = GetCheckedWorkingList(); |
| | | if (workingList == null || workingList.Count < 1) |
| | | { |
| | | var workingHelper = GetWorkingHelper(); |
| | | if (!workingHelper.Initialized) |
| | |
| | | TipFormHelper.ShowWarn("请计算后重试!"); |
| | | return; |
| | | } |
| | | var dlg = new HydroSingleWorkingLossStatisticsDlg(); |
| | | dlg.SetBindingData(workingHelper.HydroInfo); |
| | | var dlg = new HydroLossStatisticsDlg(); |
| | | dlg.SetBindingData(hydroInfo, workingHelper.Working, workingHelper.CalcuResult, isHead, allEvaluationList); |
| | | dlg.ShowDialog(); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | var dlg = new HydroMultiWorkingLossStatisticsDlg(); |
| | | dlg.SetBindingData(_hydroInfo, allCheckedWorkingList); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | var workingDlg = new HydroLossStatisticsWorkingDlg(); |
| | | workingDlg.SetBindingData(hydroInfo, workingList, isHead, allEvaluationList); |
| | | workingDlg.ShowDialog(); |
| | | } |
| | | |
| | | //综合分析 |
| | |
| | | |
| | | #region 损失曲线 |
| | | |
| | | //单工况损失曲线控件 |
| | | private HydroSingleWorkingLossCurveInteropCtrl _singleWorkingLossCurveCtrl = null; |
| | | //损失曲线交互控件 |
| | | private HydroLossCurveInteropCtrl _lossCurveInteropCtrl = null; |
| | | |
| | | //获取单工况损失曲线控件 |
| | | private HydroSingleWorkingLossCurveInteropCtrl GetSingleWorkingLossCurveCtrl() |
| | | //获取损失曲线交互控件 |
| | | private HydroLossCurveInteropCtrl GetLossCurveInteropCtrl() |
| | | { |
| | | if (_singleWorkingLossCurveCtrl == null) |
| | | if (_lossCurveInteropCtrl == null) |
| | | { |
| | | _singleWorkingLossCurveCtrl = new HydroSingleWorkingLossCurveInteropCtrl(); |
| | | _singleWorkingLossCurveCtrl.Dock = DockStyle.Fill; |
| | | _singleWorkingLossCurveCtrl.HydroClickEvent += (code) => |
| | | _lossCurveInteropCtrl = new HydroLossCurveInteropCtrl(); |
| | | _lossCurveInteropCtrl.Dock = DockStyle.Fill; |
| | | _lossCurveInteropCtrl.HydroClickEvent += (code) => |
| | | { |
| | | var visual = GetVisual(code); |
| | | SelectVisual(visual, eSimulationVisualSource.None); |
| | | }; |
| | | _singleWorkingLossCurveCtrl.HydroSpecialDisplayEvent += (list) => |
| | | _lossCurveInteropCtrl.HydroSpecialDisplayEvent += (list) => |
| | | { |
| | | _bimfaceCtrl?.SetLogicOutlineGlowEffect(list); |
| | | }; |
| | | _singleWorkingLossCurveCtrl.HydroCancelSpecialDisplayEvent += () => |
| | | _lossCurveInteropCtrl.HydroCancelSpecialDisplayEvent += () => |
| | | { |
| | | _bimfaceCtrl?.RemoveLogicOutlineGlowEffect(); |
| | | }; |
| | | } |
| | | return _singleWorkingLossCurveCtrl; |
| | | return _lossCurveInteropCtrl; |
| | | } |
| | | |
| | | //单工况损失曲线控件是否可见 |
| | | private bool IsSingleWorkingLossCurveCtrlVisible |
| | | //损失曲线控件是否可见 |
| | | private bool IsLossCurveInteropCtrlVisible |
| | | { |
| | | get |
| | | { |
| | |
| | | { |
| | | if (this.controlContainerBottom.Controls.Count > 0) |
| | | { |
| | | if (this.controlContainerBottom.Controls[0] is HydroSingleWorkingLossCurveInteropCtrl) |
| | | if (this.controlContainerBottom.Controls[0] is HydroLossCurveInteropCtrl) |
| | | { |
| | | return true; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | //显示单工况损失曲线控件 |
| | | private void ShowSingleWorkingLossCurveCtrl(Yw.Model.HydroModelInfo hydroInfo, HydroCalcuResult calcuResult, HydroVisualInfo visual) |
| | | //显示损失曲线控件 |
| | | private void ShowLossCurveInteropCtrl |
| | | ( |
| | | Yw.Model.HydroModelInfo hydroInfo, |
| | | HydroWorkingVmo working, |
| | | HydroNodeInfo node, |
| | | HydroCalcuResult calcuResult = null, |
| | | bool isHead = false, |
| | | List<HydroEvaluationVmo> allEvaluationList = null |
| | | ) |
| | | { |
| | | var singleWorkingLossCurveCtrl = GetSingleWorkingLossCurveCtrl(); |
| | | if (!IsSingleWorkingLossCurveCtrlVisible) |
| | | var ctrl = GetLossCurveInteropCtrl(); |
| | | if (!IsLossCurveInteropCtrlVisible) |
| | | { |
| | | this.controlContainerBottom.Controls.Clear(); |
| | | this.controlContainerBottom.Controls.Add(singleWorkingLossCurveCtrl); |
| | | this.controlContainerBottom.Controls.Add(ctrl); |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; |
| | | this.docPnlBottom.Text = "损失曲线"; |
| | | this.docPnlBottom.Height = 350; |
| | | } |
| | | singleWorkingLossCurveCtrl.SetBindingData(hydroInfo, calcuResult, visual); |
| | | ctrl.SetBindingData(hydroInfo, working, node, calcuResult, isHead, allEvaluationList); |
| | | } |
| | | |
| | | //损失曲线 |
| | | private void barBtnWorkingLossCurve_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | private async void barBtnLossCurve_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (_visual == null) |
| | | var node = GetSelectNode(); |
| | | if (node == null) |
| | | { |
| | | SelectInputSource(); |
| | | if (_visual == null) |
| | | { |
| | | TipFormHelper.ShowWarn("请选择构件后重试!"); |
| | | return; |
| | | } |
| | | } |
| | | HydroVisualInfo visual = _visual; |
| | | if (_visual is HydroLinkInfo linkInfo) |
| | | { |
| | | var visualListHelper = GetVisualListHelper(); |
| | | visual = visualListHelper.GetVisual(linkInfo.StartCode); |
| | | return; |
| | | } |
| | | |
| | | var workingCheckedListHelper = GetWorkingCheckedListHelper(); |
| | | var allCheckedWorkingList = workingCheckedListHelper.GetCheckedWorkingList(); |
| | | if (allCheckedWorkingList == null || allCheckedWorkingList.Count < 1) |
| | | var isHead = _calcuPressModeIsHead; |
| | | var allEvaluationList = await GetEvaluationList(); |
| | | |
| | | var workingList = GetCheckedWorkingList(); |
| | | if (workingList == null || workingList.Count < 1) |
| | | { |
| | | var workingHelper = GetWorkingHelper(); |
| | | if (!workingHelper.Initialized) |
| | |
| | | TipFormHelper.ShowWarn("请计算后重试!"); |
| | | return; |
| | | } |
| | | ShowSingleWorkingLossCurveCtrl(workingHelper.HydroInfo, workingHelper.CalcuResult, visual); |
| | | ShowLossCurveInteropCtrl(workingHelper.HydroInfo, workingHelper.Working, node, workingHelper.CalcuResult, isHead, allEvaluationList); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | var dlg = new HydroMultiWorkingLossCurveDlg(); |
| | | dlg.HydroClickEvent += (code) => |
| | | { |
| | | SelectVisual(code, eSimulationVisualSource.None); |
| | | }; |
| | | dlg.SetBindingData(_hydroInfo, allCheckedWorkingList, visual); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | var dlg = new HydroLossCurveMultiWorkingDlg(); |
| | | dlg.SetBindingData(_hydroInfo, workingList, node, _calcuPressModeIsHead, allEvaluationList); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion 损失曲线 |
| | | |
| | | #region 方案管理 |
| | | |
| | |
| | | } |
| | | |
| | | #endregion 方案管理 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |