增加公共操作的方法,过热度和过冷度的配置弹窗设置

This commit is contained in:
2025-01-06 17:55:01 +08:00
parent ff07461818
commit 82ee066300
18 changed files with 673 additions and 43 deletions

View File

@@ -1,5 +1,6 @@
using CapMachine.Core;
using CapMachine.Shared.Controls;
using CapMachine.Wpf.Models.PPCalc;
using CapMachine.Wpf.Models.Tag;
using CapMachine.Wpf.PPCalculation;
using Prism.Events;
@@ -66,20 +67,26 @@ namespace CapMachine.Wpf.Services
//Cond1TempTag = TagManager.DicTags.GetValueOrDefault("冷凝器出口水温[℃]");
//CondInTempTag = TagManager.DicTags.GetValueOrDefault("冷凝器进口温度[℃]");
FluidsPath = ConfigHelper.GetValue("FluidsPath");
SuperHeatCoolConfig.FluidsPath = ConfigHelper.GetValue("FluidsPath");
SuperHeatCoolConfig.Cryogen = ConfigHelper.GetValue("Cryogen");
RtScanDeviceStart();
}
/// <summary>
/// 过热度和过冷度计算FLUID路径
/// REFPROP
/// REFPRP64.DLL
///
/// ****FluidsPath 路径不能太长,否则会导致错误***********
/// 当前的配置
/// </summary>
public string FluidsPath { get; set; } = "C:\\Program Files (x86)\\REFPROP\\fluids";
public SuperHeatCoolConfigModel SuperHeatCoolConfig { get; set; } = new SuperHeatCoolConfigModel();
/// <summary>
/// 保存配置信息
/// </summary>
public void SaveSuperHeatCoolConfig()
{
ConfigHelper.SetValue("FluidsPath", SuperHeatCoolConfig.FluidsPath);
ConfigHelper.SetValue("Cryogen", SuperHeatCoolConfig.Cryogen);
}
/// <summary>
/// 吸气压力
@@ -112,10 +119,10 @@ namespace CapMachine.Wpf.Services
/// </summary>
public double Subcool { get; set; }
/// <summary>
/// 制冷剂
/// </summary>
public string Cryogen { get; set; } = "R134a";
///// <summary>
///// 制冷剂
///// </summary>
//public string Cryogen { get; set; } = "R134a";
/// <summary>
/// 风量数据-乘以系数的后的最终结果
@@ -164,7 +171,7 @@ namespace CapMachine.Wpf.Services
//textBox5.Text = "";
string hpath = FluidsPath;
string hpath = SuperHeatCoolConfig.FluidsPath;
long size = hpath.Length;
hpath += new String(' ', 255 - (int)size);
@@ -173,7 +180,7 @@ namespace CapMachine.Wpf.Services
long numComps = 1;//冷媒个数
//string hfld = "R1234YF.FLD"; R1234YF
string hfld = "";
if (Cryogen == "R134a")
if (SuperHeatCoolConfig.Cryogen == "R134a")
{
hfld = "R134A.FLD";
}
@@ -269,7 +276,7 @@ namespace CapMachine.Wpf.Services
//string hfld = "R1234YF.FLD";
//string hfld = "R134A.FLD";
string hfld = "";
if (Cryogen == "R134a")
if (SuperHeatCoolConfig.Cryogen == "R134a")
{
hfld = "R134A.FLD";
}