lixiaojun
2024-10-12 a92e5aca2f662baed4481870d921def68b63b914
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -498,17 +498,27 @@
                return;
            }
            var pumps = _hydroInfo.Pumps;
            var vmList = pumps.Select(x => new HStation.WinFrmUI.PhartRelation.Perform2dMultiViewModel()
            var vmList = new List<Yw.WinFrmUI.Phart.PumpSerialParallelViewModel>();
            foreach (var x in pumps)
            {
                Id = x.Code,
                Name = x.Code,
                SpeedRatio = x.SpeedRatio ?? 1,
                PointsQH = _hydroInfo.Curves?.Find(t => t.Code == x.CurveQH)?.CurveData?.Select(z => new PhartRelation.PerformPoint2dViewModel() { X = z.X, Y = z.Y }).ToList(),
                PointsQP = _hydroInfo.Curves?.Find(t => t.Code == x.CurveQP)?.CurveData?.Select(z => new PhartRelation.PerformPoint2dViewModel() { X = z.X, Y = z.Y }).ToList(),
                PointsQE = _hydroInfo.Curves?.Find(t => t.Code == x.CurveQE)?.CurveData?.Select(z => new PhartRelation.PerformPoint2dViewModel() { X = z.X, Y = z.Y }).ToList(),
            }).ToList();
            var dlg = new HStation.WinFrmUI.PhartRelation.PumpPerform2dMultiViewDlg();
            dlg.SetBindingData(vmList, null, false, true);
                var vm = new Yw.WinFrmUI.Phart.PumpSerialParallelViewModel();
                vm.Id = x.Code;
                vm.Name = x.Code;
                //vm.IsBp = ;
                vm.RatedSpeed = 590;
                vm.CurrentSpeed = 590;
                vm.CurrentHz = 50;
                var PointsQH = _hydroInfo.Curves?.Find(t => t.Code == x.CurveQH)?.CurveData?.Select(z => new Yw.Geometry.Point2d() { X = z.X, Y = z.Y }).ToList();
                var PointsQP = _hydroInfo.Curves?.Find(t => t.Code == x.CurveQP)?.CurveData?.Select(z => new Yw.Geometry.Point2d { X = z.X, Y = z.Y }).ToList();
                var PointsQE = _hydroInfo.Curves?.Find(t => t.Code == x.CurveQE)?.CurveData?.Select(z => new Yw.Geometry.Point2d { X = z.X, Y = z.Y }).ToList();
                vm.Qh = new Yw.Geometry.CubicSpline2d(PointsQH);
                vm.Qe = new Yw.Geometry.CubicSpline2d(PointsQE);
                vm.Qp = new Yw.Geometry.CubicSpline2d(PointsQP);
                vmList.Add(vm);
            }
            var dlg = new HStation.WinFrmUI.PhartRelation.PumpSerialParallelChartDlg();
            dlg.SetBindingData(vmList, null, true);
            dlg.ShowDialog();
        }