| | |
| | | global using Yw.EPAnet; |
| | | using DevExpress.Mvvm.Native; |
| | | using DevExpress.Pdf.Native; |
| | | using DevExpress.Utils.DirectXPaint; |
| | | using NetTaste; |
| | | using NPOI.SS.Formula.Functions; |
| | | using HStation.WinFrmUI.PhartRelation; |
| | | using Yw.WinFrmUI.Bimface; |
| | | using Yw.WinFrmUI.Hydro; |
| | | |
| | |
| | | this.PageTitle.Caption = "水力模拟"; |
| | | this.PageTitle.HeaderSvgImage = this.svgImg32[0]; |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; |
| | | this.docPnlRight.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; |
| | | this.docPnlRight.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; |
| | | RegistBulkSetEvents(); |
| | | } |
| | | |
| | | private HStation.Vmo.XhsProjectVmo _project = null;//项目 |
| | |
| | | this.tabPageQ3d.Controls.Clear(); |
| | | this.tabPageQ3d.Controls.Add(q3dCtrl); |
| | | q3dCtrl.InitialData(() => _hydroInfo); |
| | | ShowPropertyCtrl(); |
| | | |
| | | } |
| | | |
| | | #region Bimface |
| | | |
| | | //bimface控件 |
| | | private XhsProjectSimulationBimfaceCtrl _bimfaceCtrl = null; |
| | | |
| | | //获取 bimface 控件 |
| | | private XhsProjectSimulationBimfaceCtrl GetBimfaceCtrl() |
| | |
| | | return _bimfaceCtrl; |
| | | } |
| | | |
| | | //bimface控件 |
| | | private XhsProjectSimulationBimfaceCtrl _bimfaceCtrl = null; |
| | | |
| | | |
| | | //设置Bimface连接颜色 |
| | | private async void SetBimfaceLinkColor() |
| | |
| | | } |
| | | } |
| | | |
| | | #endregion Bimface |
| | | #endregion |
| | | |
| | | #region Q3d |
| | | |
| | |
| | | { |
| | | _propertyCtrl = new XhsProjectSimulationPropertyCtrl(); |
| | | _propertyCtrl.Dock = DockStyle.Fill; |
| | | _propertyCtrl.InitialData(() => _hydroInfo); |
| | | _propertyCtrl.InitialData(() => _hydroInfo, () => GetAllCalcuResultList()); |
| | | _propertyCtrl.BlinkLinkParterEvent += async (code, linkCode) => |
| | | { //强调连接组件 |
| | | if (string.IsNullOrEmpty(code)) |
| | |
| | | } |
| | | this.controlContainerBottom.Controls.Clear(); |
| | | var matchingListCtrl = GetMatchingListCtrl(); |
| | | var input = AssetsMatchingParasHelper.Create(_hydroInfo); |
| | | var input = AssetsMatchingParasHelper.Create(_hydroInfo, GetAllCalcuResultList()); |
| | | matchingListCtrl.SetBindingData(input); |
| | | this.controlContainerBottom.Controls.Add(matchingListCtrl); |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; |
| | |
| | | |
| | | #endregion 水力校验 |
| | | |
| | | #region 保存水力信息 |
| | | #region 保存信息 |
| | | |
| | | //保存 |
| | | private async void barBtnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | |
| | | return; |
| | | } |
| | | var parterListCtrl = GetParterListCtrl(); |
| | | parterListCtrl.SetBindingData(_hydroInfo, GetAllCalcuResult()); |
| | | parterListCtrl.SetBindingData(_hydroInfo, GetAllCalcuResultList()); |
| | | this.controlContainerBottom.Controls.Clear(); |
| | | this.controlContainerBottom.Controls.Add(parterListCtrl); |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; |
| | |
| | | |
| | | #endregion INP导出 |
| | | |
| | | #region 配置 |
| | | #region 批量配置 |
| | | |
| | | //注册批量配置事件 |
| | | private void RegistBulkSetEvents() |
| | | { |
| | | //水库 |
| | | this.barBtnSetReservoirList.ItemClick += delegate |
| | | { |
| | | var dlg = new HydroReservoirBulkSetListDlg(); |
| | | dlg.ShowDialog(); |
| | | }; |
| | | //水池 |
| | | this.barBtnSetTankList.ItemClick += delegate |
| | | { |
| | | var dlg = new HydroTankBulkSetListDlg(); |
| | | dlg.ShowDialog(); |
| | | }; |
| | | //水箱 |
| | | this.barBtnSetWaterboxList.ItemClick += delegate |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | var dlg = new HydroWaterboxBulkSetListDlg(); |
| | | dlg.SetBindingData(_hydroInfo); |
| | | dlg.ShowDialog(); |
| | | }; |
| | | //连接节点 |
| | | this.barBtnSetJunctionList.ItemClick += delegate |
| | | { |
| | | var dlg = new HydroJunctionBulkSetListDlg(); |
| | | dlg.ShowDialog(); |
| | | }; |
| | | //闷头 |
| | | this.barBtnSetBluntheadList.ItemClick += delegate |
| | | { |
| | | var dlg = new HydroBluntheadBulkSetListDlg(); |
| | | dlg.ShowDialog(); |
| | | }; |
| | | //弯头 |
| | | this.barBtnSetElbowsList.ItemClick += delegate |
| | | { |
| | | var dlg = new HydroElbowBulkSetListDlg(); |
| | | dlg.ShowDialog(); |
| | | }; |
| | | //三通 |
| | | this.barBtnSetThreelinkList.ItemClick += delegate |
| | | { |
| | | var dlg = new HydroThreelinkBulkSetListDlg(); |
| | | dlg.ShowDialog(); |
| | | }; |
| | | //四通 |
| | | this.barBtnSetFourlinkList.ItemClick += delegate |
| | | { |
| | | |
| | | }; |
| | | } |
| | | |
| | | |
| | | //显示RadialMenu |
| | | private void barBtnSetList_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | |
| | | this.rmSet.ShowPopup(MousePosition, true); |
| | | } |
| | | |
| | | #endregion 配置 |
| | | //弹出前 |
| | | private void rmSet_BeforePopup(object sender, CancelEventArgs e) |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | | e.Cancel = true; |
| | | return; |
| | | } |
| | | //水库 |
| | | if (_hydroInfo.Reservoirs == null || _hydroInfo.Reservoirs.Count < 1) |
| | | { |
| | | this.barBtnSetReservoirList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetReservoirList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | #region 性能曲线 |
| | | //水池 |
| | | if (_hydroInfo.Tanks == null || _hydroInfo.Tanks.Count < 1) |
| | | { |
| | | this.barBtnSetTankList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetTankList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //性能曲线 |
| | | private void barBtnFeatCurve_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | //水箱 |
| | | if (_hydroInfo.Waterboxs == null || _hydroInfo.Waterboxs.Count < 1) |
| | | { |
| | | this.barBtnSetWaterboxList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetWaterboxList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //连接节点 |
| | | if (_hydroInfo.Junctions == null || _hydroInfo.Junctions.Count < 1) |
| | | { |
| | | this.barBtnSetJunctionList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetJunctionList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //喷嘴 |
| | | if (_hydroInfo.Nozzles == null || _hydroInfo.Nozzles.Count < 1) |
| | | { |
| | | this.barBtnSetNozzleList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetNozzleList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //消火栓 |
| | | if (_hydroInfo.Hydrants == null || _hydroInfo.Hydrants.Count < 1) |
| | | { |
| | | this.barBtnSetHydrantList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetHydrantList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //闷头 |
| | | if (_hydroInfo.Bluntheads == null || _hydroInfo.Bluntheads.Count < 1) |
| | | { |
| | | this.barBtnSetBluntheadList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetBluntheadList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //弯头 |
| | | if (_hydroInfo.Elbows == null || _hydroInfo.Elbows.Count < 1) |
| | | { |
| | | this.barBtnSetElbowsList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetElbowsList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //三通 |
| | | if (_hydroInfo.Threelinks == null || _hydroInfo.Threelinks.Count < 1) |
| | | { |
| | | this.barBtnSetThreelinkList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetThreelinkList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //四通 |
| | | if (_hydroInfo.Fourlinks == null || _hydroInfo.Fourlinks.Count < 1) |
| | | { |
| | | this.barBtnSetFourlinkList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetFourlinkList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //水表 |
| | | if (_hydroInfo.Meters == null || _hydroInfo.Meters.Count < 1) |
| | | { |
| | | this.barBtnSetMeterList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetMeterList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //流量计 |
| | | if (_hydroInfo.Flowmeters == null || _hydroInfo.Flowmeters.Count < 1) |
| | | { |
| | | this.barBtnSetFlowmeterList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetFlowmeterList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //压力表 |
| | | if (_hydroInfo.Pressmeters == null || _hydroInfo.Pressmeters.Count < 1) |
| | | { |
| | | this.barBtnSetPressmeterList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetPressmeterList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //管道 |
| | | if (_hydroInfo.Pipes == null || _hydroInfo.Pipes.Count < 1) |
| | | { |
| | | this.barBtnSetPipeList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetPipeList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //过渡件 |
| | | if (_hydroInfo.Translations == null || _hydroInfo.Translations.Count < 1) |
| | | { |
| | | this.barBtnSetTranslationList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetTranslationList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //换热器 |
| | | if (_hydroInfo.Exchangers == null || _hydroInfo.Exchangers.Count < 1) |
| | | { |
| | | this.barBtnSetExchangerList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetExchangerList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //空压机 |
| | | if (_hydroInfo.Compressors == null || _hydroInfo.Compressors.Count < 1) |
| | | { |
| | | this.barBtnSetCompressorList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetCompressorList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //水泵 |
| | | if (_hydroInfo.Pumps == null || _hydroInfo.Pumps.Count < 1) |
| | | { |
| | | this.barBtnSetPumpList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetPumpList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | //阀门 |
| | | if (_hydroInfo.Valves == null || _hydroInfo.Valves.Count < 1) |
| | | { |
| | | this.barBtnSetValveList.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | else |
| | | { |
| | | this.barBtnSetValveList.Visibility = DevExpress.XtraBars.BarItemVisibility.Always; |
| | | } |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 并联分析 |
| | | |
| | | //并联分析 |
| | | private void barBtnAnaly_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | | return; |
| | | } |
| | | if (_calcuResult == null) |
| | | if (_hydroInfo.Pumps == null || _hydroInfo.Pumps.Count < 1) |
| | | { |
| | | return; |
| | | } |
| | | if (!_calcuResult.Succeed) |
| | | var allCalcuResultList = GetAllCalcuResultList(); |
| | | var vmList = new List<XhsSinglePumpViewModel>(); |
| | | foreach (var pump in _hydroInfo.Pumps) |
| | | { |
| | | return; |
| | | } |
| | | var pumps = _hydroInfo.Pumps; |
| | | var curve_list = _hydroInfo.Curves; |
| | | if (curve_list == null || !curve_list.Any()) |
| | | { |
| | | return; |
| | | } |
| | | var vmList = new List<Yw.WinFrmUI.Phart.PumpSerialParallelViewModel>(); |
| | | foreach (var x in pumps) |
| | | { |
| | | if (!x.RatedN.HasValue) |
| | | if (!pump.RatedN.HasValue) |
| | | { |
| | | continue; |
| | | } |
| | | var qh = curve_list.Find(t => t.Code == x.CurveQH)?.CurveData; |
| | | var qe = curve_list.Find(t => t.Code == x.CurveQE)?.CurveData; |
| | | var qp = curve_list.Find(t => t.Code == x.CurveQP)?.CurveData; |
| | | |
| | | var qh = _hydroInfo.Curves?.Find(t => t.Code == pump.CurveQH)?.CurveData; |
| | | var qe = _hydroInfo.Curves?.Find(t => t.Code == pump.CurveQE)?.CurveData; |
| | | var qp = _hydroInfo.Curves?.Find(t => t.Code == pump.CurveQP)?.CurveData; |
| | | if (qh == null) |
| | | { |
| | | continue; |
| | | } |
| | | |
| | | var rated_speed = x.RatedN.Value; |
| | | var speed_ratio = x.SpeedRatio; |
| | | var qhPtList = qh.Select(x => new XhsSplinePointViewModel(x.X, x.Y)).ToList(); |
| | | var qePtList = qe?.Select(x => new XhsSplinePointViewModel(x.X, x.Y)).ToList(); |
| | | var qpPtList = qp?.Select(x => new XhsSplinePointViewModel(x.X, x.Y)).ToList(); |
| | | |
| | | var qh_pt_list = qh.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | var qe_pt_list = qe?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | var qp_pt_list = qp?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); |
| | | |
| | | var vm = new Yw.WinFrmUI.Phart.PumpSerialParallelViewModel(); |
| | | vm.Id = x.Code; |
| | | vm.Name = x.Code; |
| | | //vm.IsBp = ; |
| | | vm.RatedSpeed = rated_speed; |
| | | vm.CurrentSpeed = Math.Round(rated_speed * speed_ratio); |
| | | vm.CurrentHz = Math.Round(vm.CurrentSpeed / vm.RatedSpeed * 50, 1); |
| | | |
| | | vm.Qh = new Yw.Geometry.CubicSpline2d(qh_pt_list); |
| | | vm.Qe = new Yw.Geometry.CubicSpline2d(qe_pt_list); |
| | | vm.Qp = new Yw.Geometry.CubicSpline2d(qp_pt_list); |
| | | var vm = new XhsSinglePumpViewModel(); |
| | | vmList.Add(vm); |
| | | vm.ID = pump.ID; |
| | | vm.Name = pump.Name; |
| | | vm.Code = pump.Code; |
| | | vm.IsBp = true; |
| | | vm.RunStatus = pump.LinkStatus == Yw.Hydro.LinkStatus.Open; |
| | | vm.RatedHz = pump.RatedHz; |
| | | vm.CurrentHz = Math.Round(pump.RatedHz * pump.SpeedRatio, 1); |
| | | vm.RatedSpeed = pump.RatedN.Value; |
| | | vm.CurrentSpeed = Math.Round(pump.RatedN.Value * pump.SpeedRatio); |
| | | vm.CurveQH = qhPtList; |
| | | vm.CurveQE = qePtList; |
| | | vm.CurveQP = qpPtList; |
| | | |
| | | if (allCalcuResultList != null && allCalcuResultList.Count > 0) |
| | | { |
| | | var calcuResult = allCalcuResultList.Find(x => x.Code == pump.Code) as HydroCalcuLinkResult; |
| | | if (calcuResult != null) |
| | | { |
| | | if (calcuResult.CalcuFlow.HasValue) |
| | | { |
| | | vm.CalcuQ = Math.Abs(calcuResult.CalcuFlow.Value); |
| | | } |
| | | |
| | | var calcuResultStart = allCalcuResultList.Find(x => x.Code == pump.StartCode) as HydroCalcuNodeResult; |
| | | var calcuResultEnd = allCalcuResultList.Find(x => x.Code == pump.EndCode) as HydroCalcuNodeResult; |
| | | if (calcuResultStart != null && calcuResultEnd != null) |
| | | { |
| | | if (calcuResultStart.CalcuHead.HasValue && calcuResultEnd.CalcuHead.HasValue) |
| | | { |
| | | vm.CalcuH = Math.Round(Math.Abs(calcuResultStart.CalcuHead.Value - calcuResultEnd.CalcuHead.Value), 4); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | var dlg = new HStation.WinFrmUI.PhartRelation.PumpSerialParallelChartDlg(); |
| | | dlg.SetBindingData(vmList, null, true); |
| | | var dlg = new PumpParallelChartDlg(); |
| | | dlg.SetBindingData(vmList); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | #endregion 性能曲线 |
| | | #endregion |
| | | |
| | | #region 水力计算 |
| | | |
| | |
| | | } |
| | | |
| | | //获取计算结果 |
| | | private List<IHydroCalcuResult> GetAllCalcuResult() |
| | | private List<IHydroCalcuResult> GetAllCalcuResultList() |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | |
| | | |
| | | #region 颜色分级 |
| | | |
| | | //颜色分级应用列表 |
| | | private List<HydroGradingApplyViewModel> _allGradingApplyList = null; |
| | | //颜色分级编码列表 |
| | | private List<string> _allGradingCodeList = null; |
| | | |
| | | //设置 |
| | | private void barBtnGradingSet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | //设置颜色分级 |
| | | private void SetGrading() |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //应用 |
| | | private void barBtnGradingApply_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | //应用颜色分级 |
| | | private async void ApplyGrading() |
| | | { |
| | | if (_hydroInfo == null) |
| | | { |
| | |
| | | if (_allGradingApplyList == null) |
| | | { |
| | | _allGradingApplyList = new List<HydroGradingApplyViewModel>(); |
| | | if (_hydroInfo.Waterboxs != null && _hydroInfo.Waterboxs.Count > 0) |
| | | { |
| | | _allGradingApplyList.Add(new HydroGradingApplyViewModel() |
| | | { |
| | | Code = Yw.Hydro.ParterCatalog.Waterbox, |
| | | Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Waterbox), |
| | | PropName = string.Empty |
| | | }); |
| | | } |
| | | |
| | | if (_hydroInfo.Pumps != null && _hydroInfo.Pumps.Count > 0) |
| | | { |
| | | _allGradingApplyList.Add(new HydroGradingApplyViewModel() |
| | |
| | | PropName = string.Empty |
| | | }); |
| | | } |
| | | if (_hydroInfo.Nozzles != null && _hydroInfo.Nozzles.Count > 0) |
| | | { |
| | | _allGradingApplyList.Add(new HydroGradingApplyViewModel() |
| | | { |
| | | Code = Yw.Hydro.ParterCatalog.Nozzle, |
| | | Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Nozzle), |
| | | PropName = string.Empty |
| | | }); |
| | | } |
| | | } |
| | | var dlg = new ApplyHydroGradingDlg(); |
| | | dlg.SetBindingData(() => _hydroInfo, _allGradingApplyList, GetAllCalcuResult()); |
| | | dlg.SetBindingData(() => _hydroInfo, _allGradingApplyList, GetAllCalcuResultList()); |
| | | dlg.ReloadDataEvent += (obj) => |
| | | { |
| | | _allGradingCodeList = obj?.Select(x => x.Code).Distinct().ToList(); |
| | |
| | | await _bimfaceCtrl?.OverrideComponentsColor(x.Select(t => t.Code).Distinct().ToList(), x.Key, 1); |
| | | }); |
| | | }; |
| | | dlg.ShowDialog(); |
| | | if (dlg.ShowDialog() != DialogResult.OK) |
| | | { |
| | | await _bimfaceCtrl?.RestoreComponentsColor(_allGradingCodeList); |
| | | } |
| | | } |
| | | |
| | | //取消 |
| | | private async void barBtnGradingCancel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | //设置 |
| | | private void barBtnGradingSet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | await _bimfaceCtrl?.RestoreComponentsColor(_allGradingCodeList); |
| | | SetGrading(); |
| | | } |
| | | |
| | | //应用 |
| | | private void barBtnGradingApply_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | ApplyGrading(); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |