From c0f9915265878e56e91ee97f7f8d925db1e12626 Mon Sep 17 00:00:00 2001 From: cloudflight <cloudflight@126.com> Date: 星期六, 02 十二月 2023 18:50:45 +0800 Subject: [PATCH] 2023年12月2日_3 --- Hydro.MapView/Base/NodeViewModel.cs | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/Hydro.MapView/Base/NodeViewModel.cs b/Hydro.MapView/Base/NodeViewModel.cs index 861526c..dadacdc 100644 --- a/Hydro.MapView/Base/NodeViewModel.cs +++ b/Hydro.MapView/Base/NodeViewModel.cs @@ -14,7 +14,7 @@ namespace Hydro.MapView { - public class NodeViewModel : NodeModel, IBaseViewModel + public class NodeViewModel : NodeCalcModel, IBaseViewModel { public NodeViewModel() { @@ -227,5 +227,14 @@ if (this is NozzleViewModel) return true; return false; } + public string ToEmitterString() + { + if (this is NozzleViewModel n) + { + if (n.FlowCoefficient > 0) + return $"{ID}\t{n.FlowCoefficient * Math.Pow(10 / 101.972, 0.5) / 1000 * 60}\r\n"; + } + return null; + } } } -- Gitblit v1.9.3