using System.Collections.Generic;
|
using TProduct.Model;
|
|
namespace TProduct.WinFrmUI.TValve
|
{
|
internal class FeatTestHelper
|
{
|
//
|
private List<TProduct.Model.WorkBenchMonitorPoint> _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<TProduct.Model.WorkBenchMonitorPoint> 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<TProduct.Model.MonitorPointValuePure> 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;
|
/// <summary>
|
/// 设置阀门开度
|
/// </summary>
|
/// <param name="prop"></param>
|
/// <param name="paras"></param>
|
/// <returns></returns>
|
public virtual void SetValveDegree(double paras)
|
{
|
|
valve阀门开度 = paras;
|
|
}
|
|
|
|
|
|
/// <summary>
|
/// Mpa=>m
|
/// </summary>
|
public static double UnitConvert_MPa2M(double mpa)
|
{
|
return mpa * 1000 / TProduct.ConstantParas.g;
|
}
|
}
|
}
|