From a67da735b33be01b24845ce03ae7551cf55ddbbc Mon Sep 17 00:00:00 2001 From: ningshuxia <ningshuxia0927@outlook.com> Date: 星期三, 16 四月 2025 09:08:16 +0800 Subject: [PATCH] 代码修改i --- 02-desktop/Model/IStation.Model.Basic/PumpCurve/PumpCurve_Model.cs | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/02-desktop/Model/IStation.Model.Basic/PumpCurve/PumpCurve_Model.cs b/02-desktop/Model/IStation.Model.Basic/PumpCurve/PumpCurve_Model.cs index a28f075..773f446 100644 --- a/02-desktop/Model/IStation.Model.Basic/PumpCurve/PumpCurve_Model.cs +++ b/02-desktop/Model/IStation.Model.Basic/PumpCurve/PumpCurve_Model.cs @@ -10,12 +10,12 @@ /// </summary> public CurveExpress CalcuCurveQhByHz(double hz) { - if (this.CurveInfo == null || this.CurveInfo.CurveQH == null) + if (CurveInfo == null || CurveInfo.CurveQH == null) return default; - var points = this.CurveInfo.CurveQH.GetFitPoints(20); + var points = CurveInfo.CurveQH.GetFitPoints(20); double f_ratio = hz / 50.0; var pts = points.Select(x => new CurvePoint(x.X * f_ratio, x.Y * f_ratio * f_ratio)).ToList(); - return new CurveExpress(pts, this.CurveInfo.CurveQH.FitType); + return new CurveExpress(pts, CurveInfo.CurveQH.FitType); } /// <summary> @@ -23,12 +23,12 @@ /// </summary> public CurveExpress CalcuCurveQpByHz(double hz) { - if (this.CurveInfo == null || this.CurveInfo.CurveQP == null) + if (CurveInfo == null || CurveInfo.CurveQP == null) return default; - var points = this.CurveInfo.CurveQP.GetFitPoints(20); + var points = CurveInfo.CurveQP.GetFitPoints(20); double f_ratio = hz / 50.0; var pts = points.Select(x => new CurvePoint(x.X * f_ratio, x.Y * f_ratio * f_ratio * f_ratio)).ToList(); - return new CurveExpress(pts, this.CurveInfo.CurveQP.FitType); + return new CurveExpress(pts, CurveInfo.CurveQP.FitType); } /// <summary> @@ -36,12 +36,12 @@ /// </summary> public CurveExpress CalcuCurveQeByHz(double hz) { - if (this.CurveInfo == null || this.CurveInfo.CurveQE == null) + if (CurveInfo == null || CurveInfo.CurveQE == null) return default; - var points = this.CurveInfo.CurveQE.GetFitPoints(20); + var points = CurveInfo.CurveQE.GetFitPoints(20); double f_ratio = hz / 50.0; var pts = points.Select(x => new CurvePoint(x.X * f_ratio, x.Y)).ToList(); - return new CurveExpress(pts, this.CurveInfo.CurveQE.FitType); + return new CurveExpress(pts, CurveInfo.CurveQE.FitType); } /// <summary> /// 閫氳繃 娴侀噺 鑾峰彇 鎷熷悎鍔熺巼 @@ -62,25 +62,25 @@ { case eFeatCurveType.QH: { - if (this.CurveInfo != null && this.CurveInfo.CurveQH != null) + if (CurveInfo != null && CurveInfo.CurveQH != null) { - list = this.CurveInfo.CurveQH.GetFitPoints(pointNumber); + list = CurveInfo.CurveQH.GetFitPoints(pointNumber); } } break; case eFeatCurveType.QP: { - if (this.CurveInfo != null && this.CurveInfo.CurveQP != null) + if (CurveInfo != null && CurveInfo.CurveQP != null) { - list = this.CurveInfo.CurveQP.GetFitPoints(pointNumber); + list = CurveInfo.CurveQP.GetFitPoints(pointNumber); } } break; case eFeatCurveType.QE: { - if (this.CurveInfo != null && this.CurveInfo.CurveQE != null) + if (CurveInfo != null && CurveInfo.CurveQE != null) { - list = this.CurveInfo.CurveQE.GetFitPoints(pointNumber); + list = CurveInfo.CurveQE.GetFitPoints(pointNumber); } } break; -- Gitblit v1.9.3