| | |
| | | using DevExpress.Mvvm.Native; |
| | | using DevExpress.Pdf.Native; |
| | | using Mapster; |
| | | using Yw.EPAnet; |
| | | using Yw.Epanet; |
| | | using Yw.Hydro; |
| | | using Yw.Model; |
| | | using Yw.Vmo; |
| | | using Yw.WinFrmUI.Bimface; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | |
| | | { |
| | | base.InitialDataSource(); |
| | | ShowBimfaceCtrl(); |
| | | ShowQ3dCtrl(); |
| | | ShowL3d2Ctrl(); |
| | | ShowPropertyCtrl(); |
| | | InitialSvgImages(); |
| | | } |
| | |
| | | private void InitialSvgImages() |
| | | { |
| | | //监测 |
| | | this.barBtnDockingMonitor.ImageOptions.SvgImage = HydroMonitorSvgImageHelper.Docking; |
| | | this.barBtnAnalyseMonitor.ImageOptions.SvgImage = HydroMonitorSvgImageHelper.Analyse; |
| | | this.barBtnSetMonitorList.ImageOptions.SvgImage = HydroMonitorSvgImageHelper.Docking; |
| | | |
| | | //水库 |
| | | this.barBtnSetReservoirList.ImageOptions.SvgImage = AssetsMainSvgImageHelper.Tank; |
| | |
| | | this.barBtnSetWaterboxList.ImageOptions.SvgImageSize = new Size(32, 32); |
| | | this.barBtnSetWaterboxList.ItemAppearance.Normal.ForeColor = Color.FromArgb(0, 122, 204); |
| | | this.barBtnSetWaterboxList.ImageOptions.AllowGlyphSkinning = DevExpress.Utils.DefaultBoolean.True; |
| | | |
| | | //连接节点 |
| | | this.barBtnSetJunctionList.ImageOptions.SvgImage = HydroMainSvgImageHelper.Junction; |
| | | this.barBtnSetJunctionList.ImageOptions.SvgImageSize = new Size(32, 32); |
| | | this.barBtnSetJunctionList.ItemAppearance.Normal.ForeColor = Color.FromArgb(0, 122, 204); |
| | | this.barBtnSetJunctionList.ImageOptions.AllowGlyphSkinning = DevExpress.Utils.DefaultBoolean.True; |
| | | |
| | | //闷头 |
| | | this.barBtnSetBluntheadList.ImageOptions.SvgImage = AssetsMainSvgImageHelper.Blunthead; |
| | |
| | | |
| | | #endregion BIM控件 |
| | | |
| | | #region Q3d控件 |
| | | #region L3d2控件 |
| | | |
| | | //Q3d 控件 |
| | | private XhsProjectSimulationQ3dCtrl _q3dCtrl = null; |
| | | //L3d2控件 |
| | | private XhsProjectSimulationL3d2Ctrl _l3d2ctrl = null; |
| | | |
| | | //获取 Q3d 控件 |
| | | private XhsProjectSimulationQ3dCtrl GetQ3dCtrl() |
| | | //获取L3d2控件 |
| | | private XhsProjectSimulationL3d2Ctrl GetL3d2Ctrl() |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | | return default; |
| | | } |
| | | if (_q3dCtrl == null) |
| | | if (_l3d2ctrl == null) |
| | | { |
| | | _q3dCtrl = new XhsProjectSimulationQ3dCtrl(); |
| | | _q3dCtrl.Dock = DockStyle.Fill; |
| | | _q3dCtrl.InitialData(() => _hydroInfo); |
| | | _q3dCtrl.SelectedPartersChangedEvent += (codes) => |
| | | _l3d2ctrl = new XhsProjectSimulationL3d2Ctrl(); |
| | | _l3d2ctrl.Dock = DockStyle.Fill; |
| | | _l3d2ctrl.InitialData(hydroInfoFunc: () => _hydroInfo); |
| | | _l3d2ctrl.SelectedPartersChangedEvent += (codes) => |
| | | { |
| | | var visualListHelper = GetVisualListHelper(); |
| | | var visuals = visualListHelper.GetVisualList(codes); |
| | | SelectVisual(visuals?.LastOrDefault(), eSimulationVisualSource.Q3d); |
| | | }; |
| | | } |
| | | return _q3dCtrl; |
| | | return _l3d2ctrl; |
| | | } |
| | | |
| | | //显示 Q3d 控件 |
| | | private void ShowQ3dCtrl() |
| | | //显示L3d2控件 |
| | | private void ShowL3d2Ctrl() |
| | | { |
| | | var q3dCtrl = GetQ3dCtrl(); |
| | | var l3d2Ctrl = GetL3d2Ctrl(); |
| | | this.tabPageQ3d.Controls.Clear(); |
| | | this.tabPageQ3d.Controls.Add(q3dCtrl); |
| | | this.tabPageQ3d.Controls.Add(l3d2Ctrl); |
| | | } |
| | | |
| | | #endregion Q3d控件 |
| | | #endregion |
| | | |
| | | #region 属性控件 |
| | | |
| | |
| | | var gradingHelper = await GetGradingHelper(); |
| | | gradingHelper.Set(visual); |
| | | }; |
| | | _propertyCtrl.FlowDirectionPropertyValueChangedEvent += async (visual) => |
| | | { |
| | | //流向属性发生改变 |
| | | //判断当前是否有流向展示,若有则更新流向,最好是更新单个流向 |
| | | var flowDirectionHelper = await GetFlowEffectHelper(); |
| | | flowDirectionHelper.Set(visual); |
| | | }; |
| | | } |
| | | return _propertyCtrl; |
| | | } |
| | |
| | | } |
| | | |
| | | //显示属性控件 |
| | | private async void ShowPropertyCtrl() |
| | | private async Task ShowPropertyCtrl() |
| | | { |
| | | if (IsPropertyCtrlVisible) |
| | | { |
| | |
| | | } |
| | | |
| | | //设置属性控件 |
| | | private void SetPropertyCtrl(HydroVisualInfo visual) |
| | | private async void SetPropertyCtrl(HydroVisualInfo visual) |
| | | { |
| | | ShowPropertyCtrl(); |
| | | await ShowPropertyCtrl(); |
| | | var visualVmListHelper = GetVisualVmListHelper(); |
| | | var vm = visualVmListHelper.GetVisual(visual); |
| | | _propertyCtrl.SelectedObject = vm; |
| | |
| | | _propertyCtrl?.UpdateRows(); |
| | | } |
| | | |
| | | #endregion 属性控件 |
| | | #endregion |
| | | |
| | | #region 选择构件 |
| | | |
| | |
| | | case eSimulationVisualSource.None: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | | |
| | | case eSimulationVisualSource.Bimface: |
| | | { |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | |
| | | case eSimulationVisualSource.Q3d: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | |
| | | case eSimulationVisualSource.Property: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | } |
| | | break; |
| | | |
| | | case eSimulationVisualSource.List: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | |
| | | case eSimulationVisualSource.Set: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | |
| | | case eSimulationVisualSource.Search: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | |
| | | case eSimulationVisualSource.Monitor: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | |
| | | case eSimulationVisualSource.Check: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | |
| | | case eSimulationVisualSource.Calcu: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | |
| | | case eSimulationVisualSource.Warning: |
| | | { |
| | | _bimfaceCtrl?.ZoomAndSelectComponent(visual?.Code); |
| | | this.barBtnDockingMonitor.Enabled = visual != null; |
| | | this.barBtnAnalyseMonitor.Enabled = visual != null; |
| | | this.barBtnSetMonitorList.Enabled = visual != null; |
| | | SetPropertyCtrl(visual); |
| | | } |
| | | break; |
| | |
| | | |
| | | WaitFormHelper.ShowWaitForm("正在保存,请稍后..."); |
| | | |
| | | var bol = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance |
| | | bool bol = false; |
| | | |
| | | try |
| | | { |
| | | bol = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance |
| | | .Update(_hydroInfo, addParterList, updateParterList, removeParters); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | XtraMessageBox.Show(ex.Message); |
| | | _isSaving = false; |
| | | } |
| | | |
| | | if (!bol) |
| | | { |
| | |
| | | markHelper.Set(); |
| | | } |
| | | |
| | | #endregion 模型标注 |
| | | #endregion |
| | | |
| | | #region 水流动画 |
| | | |
| | | |
| | | //水力动画辅助类 |
| | | private SimulationFlowEffectHelper _flowEffectHelper = null; |
| | | |
| | | //获取水流动画辅助类 |
| | | private async Task<SimulationFlowEffectHelper> GetFlowEffectHelper() |
| | | { |
| | | if (_flowEffectHelper == null) |
| | | { |
| | | var visualListHelper = GetVisualListHelper(); |
| | | var calcuResultHelper = GetCalcuResultHelper(); |
| | | var bimfaceCtrl = await GetBimfaceCtrl(); |
| | | _flowEffectHelper = new SimulationFlowEffectHelper(visualListHelper, calcuResultHelper, bimfaceCtrl); |
| | | } |
| | | return _flowEffectHelper; |
| | | } |
| | | |
| | | |
| | | //水流动画是否可见 |
| | | private async void barCkFlowEffect_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (this.barCkFlowEffect.Checked) |
| | | { |
| | | this.barCkGrading.Checked = false; |
| | | } |
| | | var flowEffectHelper = await GetFlowEffectHelper(); |
| | | flowEffectHelper.Visible = this.barCkFlowEffect.Checked; |
| | | flowEffectHelper.Set(); |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 颜色分级 |
| | | |
| | |
| | | //颜色分级展示 |
| | | private async void barCkGrading_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (this.barCkGrading.Checked) |
| | | { |
| | | this.barCkFlowEffect.Checked = false; |
| | | } |
| | | var gradingHelper = await GetGradingHelper(); |
| | | gradingHelper.Visible = this.barCkGrading.Checked; |
| | | gradingHelper.Set(); |
| | | } |
| | | |
| | | #endregion 颜色分级 |
| | | #endregion |
| | | |
| | | #region 人工刷新 |
| | | |
| | |
| | | return await helper.GetAll(); |
| | | } |
| | | |
| | | //获取监测对接列表 |
| | | private async Task<List<HydroMonitorVmo>> GetMonitorDockingList() |
| | | { |
| | | var helper = GetMonitorHelper(); |
| | | return await helper.GetDockingList(); |
| | | } |
| | | |
| | | //获取监测分析列表 |
| | | private async Task<List<HydroMonitorVmo>> GetMonitorAnalyseList() |
| | | { |
| | | var helper = GetMonitorHelper(); |
| | | return await helper.GetAnalyseList(); |
| | | } |
| | | |
| | | #endregion 监测点 |
| | | #endregion |
| | | |
| | | #region 监测值 |
| | | |
| | |
| | | { |
| | | var visualListHelper = GetVisualListHelper(); |
| | | var monitorHelper = GetMonitorHelper(); |
| | | var calcuResultHelper = GetCalcuResultHelper(); |
| | | _monitorValueHelper = new SimulationMonitorValueHelper(visualListHelper, monitorHelper, calcuResultHelper); |
| | | _monitorValueHelper = new SimulationMonitorValueHelper(visualListHelper, monitorHelper); |
| | | } |
| | | return _monitorValueHelper; |
| | | } |
| | |
| | | return await helper.GetAll(); |
| | | } |
| | | |
| | | //获取监测对接值列表 |
| | | private async Task<List<HydroMonitorValueViewModel>> GetMonitorDockingValueList() |
| | | { |
| | | var helper = GetMonitorValueHelper(); |
| | | return await helper.GetDockingList(); |
| | | } |
| | | |
| | | //获取监测分析值列表 |
| | | private async Task<List<HydroMonitorValueViewModel>> GetMonitorAnalyseValueList() |
| | | { |
| | | var helper = GetMonitorValueHelper(); |
| | | return await helper.GetAnalyseList(); |
| | | } |
| | | |
| | | //重置 |
| | | //重置监测值 |
| | | private void ResetMonitorValue() |
| | | { |
| | | var allWorkingList = GetWorkingList(); |
| | |
| | | } |
| | | } |
| | | |
| | | #endregion 监测值 |
| | | #endregion |
| | | |
| | | #region 传感器测点 |
| | | #region 设置测点 |
| | | |
| | | //设置可见构件对接测点列表 |
| | | private async void SetMonitorDockingList(HydroVisualInfo visual) |
| | | //设置测点列表 |
| | | private async void SetMonitorList(HydroVisualInfo visual) |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | |
| | | var allMonitorList = await monitorHelper.GetAll(); |
| | | var monitorValueHelper = GetMonitorValueHelper(); |
| | | var allMonitorValueList = await monitorValueHelper.GetAll(); |
| | | var calcuResult = GetCalcuResult(); |
| | | var dlg = new SetHydroMonitorDockingListDlg(); |
| | | var dlg = new SetHydroMonitorListDlg(); |
| | | dlg.ReloadDataEvent += async (list) => |
| | | { |
| | | var monitorList = list?.Select(x => x.Vmo).ToList(); |
| | | await monitorHelper.Update(visual.Code, eSourceType.Docking, monitorList); |
| | | await monitorValueHelper.Update(visual.Code, eSourceType.Docking, list); |
| | | await monitorHelper.Update(visual.Code, monitorList); |
| | | await monitorValueHelper.Update(visual.Code, list); |
| | | var monitorMarkerHelper = await GetMonitorMarkerHelper(); |
| | | monitorMarkerHelper.Set(); |
| | | }; |
| | | dlg.SetBindingData(_hydroInfo, visual, allMonitorList, allMonitorValueList, calcuResult); |
| | | dlg.SetBindingData(_hydroInfo, visual, allMonitorList, allMonitorValueList); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //设置传感器测点 |
| | | private void barBtnDockingMonitor_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | //设置测点列表 |
| | | private void barBtnSetMonitorList_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (_visual == null) |
| | | { |
| | | TipFormHelper.ShowWarn("请选择构件后重试!"); |
| | | return; |
| | | } |
| | | SetMonitorDockingList(_visual); |
| | | SetMonitorList(_visual); |
| | | } |
| | | |
| | | #endregion 传感器测点 |
| | | #endregion |
| | | |
| | | #region 传感器测值 |
| | | #region 设置测值 |
| | | |
| | | //监测值列表控件 |
| | | private HydroMonitorValueListCtrl _monitorValueListCtrl = null; |
| | |
| | | } |
| | | } |
| | | |
| | | //显示监测对接值列表控件 |
| | | private async void ShowMonitorDockingValueListCtrl() |
| | | //显示监测值列表控件 |
| | | private async void ShowMonitorValueListCtrl() |
| | | { |
| | | var monitorValueListCtrl = GetMonitorValueListCtrl(); |
| | | if (!IsMonitorValueListCtrlVisible) |
| | |
| | | this.controlContainerBottom.Controls.Clear(); |
| | | this.controlContainerBottom.Controls.Add(monitorValueListCtrl); |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; |
| | | this.docPnlBottom.Text = "传感器测值"; |
| | | this.docPnlBottom.Text = "设置测值"; |
| | | this.docPnlBottom.Height = 350; |
| | | } |
| | | var allValueList = await GetMonitorDockingValueList(); |
| | | var calcuResult = GetCalcuResult(); |
| | | var allValueList = await GetMonitorValueList(); |
| | | monitorValueListCtrl.SetBindingData(allValueList); |
| | | } |
| | | |
| | | //设置传感器测值 |
| | | private void barBtnDockingMonitorValue_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | //设置测值 |
| | | private void barBtnSetMonitorValueList_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | ShowMonitorDockingValueListCtrl(); |
| | | ShowMonitorValueListCtrl(); |
| | | } |
| | | |
| | | #endregion 传感器测值 |
| | | |
| | | #region 分析测点 |
| | | |
| | | //设置可见构件分析测点列表 |
| | | private async void SetMonitorAnalyseList(HydroVisualInfo visual) |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | if (visual == null) |
| | | { |
| | | return; |
| | | } |
| | | var monitorHelper = GetMonitorHelper(); |
| | | var allMonitorList = await monitorHelper.GetAnalyseList(); |
| | | var dlg = new SetHydroMonitorAnalyseListDlg(); |
| | | dlg.ReloadDataEvent += async (list) => |
| | | { |
| | | await monitorHelper.Update(visual.Code, eSourceType.Analyse, list); |
| | | //var monitorMarkerHelper = await GetMonitorMarkerHelper(); |
| | | //monitorMarkerHelper.Update(visual.Code, monitorList); |
| | | //monitorMarkerHelper.Set(); |
| | | }; |
| | | dlg.SetBindingData(_hydroInfo, visual, allMonitorList); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //设置分析测点 |
| | | private void barBtnAnalyseMonitor_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (_visual == null) |
| | | { |
| | | return; |
| | | } |
| | | SetMonitorAnalyseList(_visual); |
| | | } |
| | | |
| | | #endregion 分析测点 |
| | | #endregion |
| | | |
| | | #region 测点标记 |
| | | |
| | |
| | | monitorMarkerHelper.Set(); |
| | | } |
| | | |
| | | #endregion 测点标记 |
| | | #endregion |
| | | |
| | | #region 模型检查 |
| | | |
| | |
| | | return _calcuResultHelper; |
| | | } |
| | | |
| | | #endregion 计算结果 |
| | | #endregion |
| | | |
| | | #region 计算失败 |
| | | |
| | |
| | | |
| | | #endregion 计算标签 |
| | | |
| | | #endregion 模型计算 |
| | | #endregion |
| | | |
| | | #region 导出INP |
| | | |
| | |
| | | ShowEvaluationDlg(); |
| | | } |
| | | |
| | | #endregion 评价规则 |
| | | #endregion |
| | | |
| | | #region 水力计算 |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | var isHead = _calcuPressModeIsHead; |
| | | var allEvaluationList = await GetEvaluationList(); |
| | | |
| | | WaitFormHelper.ShowWaitForm(this, "正在计算分析中,请稍候..."); |
| | | await Task.Delay(3000); |
| | | var calcuResult = _hydroInfo.Calcu(Yw.EPAnet.CalcuMode.MinorLoss, _calcuPressModeIsHead); |
| | | var calcuResult = _hydroInfo.Calcu(isHead, allEvaluationList); |
| | | WaitFormHelper.HideWaitForm(); |
| | | workingHelper.InitialData(hydroInfo, working, checkResult, calcuResult); |
| | | if (calcuResult.Succeed) |
| | |
| | | foreach (var working in allWorkingList) |
| | | { |
| | | baseHydroInfoRhs.UpdateWorkingInfo(working.WorkingInfo); |
| | | var calcuResult = baseHydroInfoRhs.Calcu(Yw.EPAnet.CalcuMode.MinorLoss, _calcuPressModeIsHead, allEvaluationList); |
| | | var calcuResult = baseHydroInfoRhs.Calcu(_calcuPressModeIsHead, allEvaluationList); |
| | | |
| | | var printWorking = new SimulationPrintWorkingViewModel(working); |
| | | vm.WorkingList.Add(printWorking); |
| | |
| | | foreach (var working in allWorkingList) |
| | | { |
| | | hydroInfoRhs.UpdateWorkingInfo(working.WorkingInfo); |
| | | var calcuResult = hydroInfoRhs.Calcu(Yw.EPAnet.CalcuMode.MinorLoss, _calcuPressModeIsHead, allEvaluationList); |
| | | var calcuResult = hydroInfoRhs.Calcu(_calcuPressModeIsHead, allEvaluationList); |
| | | |
| | | var printWorking = new SimulationPrintWorkingViewModel(working); |
| | | vm.Scheme.WorkingList.Add(printWorking); |
| | |
| | | var monitorValueHelper = GetMonitorValueHelper(); |
| | | var allMonitorValueList = await monitorValueHelper.GetAll(); |
| | | allMonitorValueList.UpdateMonitorValue(rhs.MonitorInfo); |
| | | var gradingHelper = await GetGradingHelper(); |
| | | gradingHelper.Set(); |
| | | }; |
| | | dlg.DeleteDataEvent += (rhs) => |
| | | { |
| | |
| | | this.docPnlBottom.Height = 350; |
| | | } |
| | | |
| | | var allMonitorList = await GetMonitorAnalyseList(); |
| | | var allMonitorList = await GetMonitorList(); |
| | | var isHead = _calcuPressModeIsHead; |
| | | var allEvaluationList = await GetEvaluationList(); |
| | | |
| | |
| | | ShowMonitorAnalyListCtrl(); |
| | | } |
| | | |
| | | #endregion 监测分析 |
| | | #endregion |
| | | |
| | | #region 工况分析 |
| | | |
| | |
| | | { |
| | | return; |
| | | } |
| | | var allMonitorList = await GetMonitorDockingList(); |
| | | |
| | | var allMonitorList = await GetMonitorList(); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | { |
| | | TipFormHelper.ShowWarn("请配置传感器测点后重试!"); |
| | | TipFormHelper.ShowWarn("请设置监测点后重试!"); |
| | | return; |
| | | } |
| | | |
| | |
| | | var workingList = GetCheckedWorkingList(); |
| | | if (workingList == null || workingList.Count < 1) |
| | | { |
| | | var allMonitorValueList = await GetMonitorValueList(); |
| | | allMonitorValueList = allMonitorValueList?.Where(x => x.PropValue.HasValue).ToList(); |
| | | if (allMonitorValueList == null || allMonitorValueList.Count < 1) |
| | | { |
| | | TipFormHelper.ShowWarn("请设置监测值后,重新计算!"); |
| | | return; |
| | | } |
| | | |
| | | var workingHelper = GetWorkingHelper(); |
| | | if (!workingHelper.Initialized) |
| | | { |
| | |
| | | //综合分析 |
| | | private async void barBtnWorkingAnaly_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (_visual == null) |
| | | if (_hydroInfo == null) |
| | | { |
| | | 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); |
| | | return; |
| | | } |
| | | |
| | | var monitorHelper = GetMonitorHelper(); |
| | | var allMonitorList = await monitorHelper.GetAll(); |
| | | var selectNode = GetSelectNode(); |
| | | if (selectNode == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var workingCheckedListHelper = GetWorkingCheckedListHelper(); |
| | | var allCheckedWorkingList = workingCheckedListHelper.GetCheckedWorkingList(); |
| | | if (allCheckedWorkingList == null || allCheckedWorkingList.Count < 1) |
| | | var allMonitorList = await GetMonitorList(); |
| | | 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 SimulationSingleWorkingAnalyDlg(); |
| | | dlg.SetBindingData(workingHelper.HydroInfo, allMonitorList, workingHelper.Working, workingHelper.CalcuResult, visual); |
| | | var dlg = new SimulationMultiAnalyDlg(); |
| | | dlg.SetBindingData(workingHelper.HydroInfo, allMonitorList, workingHelper.Working, selectNode, workingHelper.CalcuResult, isHead, allEvaluationList); |
| | | dlg.ShowDialog(); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | var dlg = new SimulationMultiWorkingAnalyDlg(); |
| | | dlg.SetBindingData(_hydroInfo, allMonitorList, allCheckedWorkingList, visual); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | var workingDlg = new SimulationMultiAnalyWorkingDlg(); |
| | | workingDlg.SetBindingData(_hydroInfo, allMonitorList, workingList, selectNode, isHead, allEvaluationList); |
| | | workingDlg.ShowDialog(); |
| | | } |
| | | |
| | | #endregion 工况分析 |
| | | #endregion |
| | | |
| | | #region 损失曲线 |
| | | |
| | |
| | | } |
| | | |
| | | #endregion 方案管理 |
| | | |
| | | |
| | | } |
| | | } |