using System.Collections.Generic; using TProduct.Model; namespace TProduct.WinFrmUI.TValve { internal class FeatTestHelper { // private List _allMonitorList = null; protected long _testItemID = 0; protected TProduct.Model.TestProjectItemView _testItem = null; protected TProduct.Model.TestProjectParas _testParas = null; protected bool _isTemperatureTrn = false; //是否温度换算 protected double _atmospherePressure = 101.3;//大气压 protected double _elevation = 100;//海拔高度 protected eRecordType _recordType = eRecordType.Instrument; internal void SetTestInfo( TProduct.Model.WorkBenchBase bench, TProduct.Model.TestProjectItemView testItem, List allMonitorList) { if (bench == null || testItem == null) return; this._testItemID = testItem.ItemID; this._testItem = testItem; this._allMonitorList = allMonitorList; var bench_setting = new WorkBenchSetting4Pump(bench.TestSetting); this._elevation = bench_setting.Elevation; this._atmospherePressure = bench_setting.AtmosphericPressure; } private double _dia = 10; public void SetValveInfo(double dia) { _dia = dia; } // public Model.ValveFeatTestRecordViewModel NewTestRecord( List valueList, double degree, out string error_info) { error_info = null; if (_allMonitorList == null || valueList == null) { error_info = "请输入测点监控值"; return null; } error_info = "代码正在完善中..."; return null; } private double? valve阀门开度 = null; /// /// 设置阀门开度 /// /// /// /// public virtual void SetValveDegree(double paras) { valve阀门开度 = paras; } /// /// Mpa=>m /// public static double UnitConvert_MPa2M(double mpa) { return mpa * 1000 / TProduct.ConstantParas.g; } } }