using System; using System.Collections.Generic; using System.Windows.Forms; namespace TProduct.WinFrmUI { public partial class AnalysisParasByQDlg : DevExpress.XtraEditors.XtraForm { private double Q; public AnalysisParasByQDlg() { InitializeComponent(); } private List pointInfoQH = null; private List pointInfoQE = null; private List pointInfoQP = null; // private List _pointInfoNPSH = null; public void SetPointInfo(List pointInfoQH, List pointInfoQE, List pointInfoQP, List pointInfoNPSH) { this.pointInfoQH = pointInfoQH; this.pointInfoQE = pointInfoQE; this.pointInfoQP = pointInfoQP; } private void btnCalc_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(textQ.Text) || pointInfoQH == null) { return; } try { Q = double.Parse(textQ.Text); } catch { MessageBox.Show("流量请输入数字"); return; } double H = Eventech.Common.FitCurveHelper.GetFitPointY(pointInfoQH, Q); textHstatic.Text = string.Format("{0:0.0}", H); if (pointInfoQE != null && pointInfoQE.Count > 4) { double E = Eventech.Common.FitCurveHelper.GetFitPointY(pointInfoQE, Q); textEstatic.Text = string.Format("{0:0.0}", E); } if (pointInfoQP != null && pointInfoQP.Count > 4) { double P = Eventech.Common.FitCurveHelper.GetFitPointY(pointInfoQP, Q); textPstatic.Text = string.Format("{0:0.0}", P); } } private void AnalysisParasByQDlg_Load(object sender, EventArgs e) { LocationDialog(); } //翻译界面语言 private void LocationDialog() { //if (TProduct.UserSetting.Localization.IsCN) // return; //this.labelQ.Text = TProduct.UserSetting.Localization.TranslateHelper.GetString("流量"); //this.labelH.Text = TProduct.UserSetting.Localization.TranslateHelper.GetString("扬程"); //this.label效率.Text = TProduct.UserSetting.Localization.TranslateHelper.GetString("效率"); //this.label功率.Text = TProduct.UserSetting.Localization.TranslateHelper.GetString("轴功率"); //this.btnCalc.Text = TProduct.UserSetting.Localization.TranslateHelper.GetString("计算"); } } }