Hydro/Yw.Hydro.Core/ParseHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingParasHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Bimface.Core/Yw.WinFrmUI.Bimface.Core.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/css/Tailwind.css | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/html/Interop3d.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/js/CustomLabels.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Hydro/Yw.Hydro.Core/ParseHelper.cs
@@ -361,6 +361,21 @@ } } //æ²çº¿ if (model.Curves != null && model.Curves.Count > 0) { foreach (var curve in model.Curves) { var curveModel = new Yw.EPAnet.Curve(); curveModel.Id = curve.Code; curveModel.Name = curve.Name; curveModel.CurveType = curve.CurveType; curveModel.CurveData = curve.CurveData?.Select(x => new CurvePoint(x.X, x.Y)).ToList(); netWork.Curves.Add(curveModel); } } #endregion WinFrmUI/HStation.WinFrmUI.Xhs.Core/00-core/AssetsMatchingParasHelper.cs
@@ -1,4 +1,5 @@ using StackExchange.Profiling.Internal; using NPOI.SS.Formula.Functions; using StackExchange.Profiling.Internal; using System; using System.Collections.Generic; using System.Linq; @@ -13,7 +14,9 @@ public class AssetsMatchingParasHelper { //å建èµäº§èªå¨å¹é ViewModel /// <summary> /// å建èµäº§èªå¨å¹é ViewModel /// </summary> public static AssetsMatchingViewModel Create(Yw.Model.HydroModelInfo hydroInfo) { var input = new AssetsMatchingViewModel(); @@ -108,6 +111,26 @@ return input; } /// <summary> /// å建泵èªå¨å¹é ViewModel /// </summary> public static PumpMatchingViewModel CreatePump(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo) { var input = new PumpMatchingViewModel(); input.ID = pumpInfo.ID; input.Code = pumpInfo.Code; input.Name = pumpInfo.Name; input.DbLocked = pumpInfo.DbLocked; input.ModelType = pumpInfo.ModelType; input.DbId = pumpInfo.DbId; input.CurveDbId = hydroInfo.Curves?.Find(t => t.Code == pumpInfo.CurveQH)?.DbId; input.RatedP = pumpInfo.RatedP; input.RatedH = pumpInfo.RatedH; input.RatedN = pumpInfo.RatedN; input.RatedQ = pumpInfo.RatedQ; return input; } //åºç¨èµäº§èªå¨å¹é ViewModel public static bool Apply(Yw.Model.HydroModelInfo hydroInfo, AssetsMatchingViewModel output) { WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs
@@ -186,24 +186,25 @@ return true; } //feedBackMsg?.Invoke("æ£å¨è¿è¡äº§åå¹é ...", Color.Black); //hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroId); //var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo); //if (await AssetsMatchingHelper.Matching(matchingParas)) //{ // if (AssetsMatchingParasHelper.Apply(hydroInfo, matchingParas)) // { // feedBackMsg?.Invoke("产åå¹é æåããã", Color.Green); // } // else // { // feedBackMsg?.Invoke("产åå¹é 失败ï¼ï¼ï¼", Color.Red); // } //} //else //{ // feedBackMsg?.Invoke("产åå¹é 失败ï¼ï¼ï¼", Color.Red); //} feedBackMsg?.Invoke("æ£å¨è¿è¡äº§åå¹é ...", Color.Black); hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroId); var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo); if (await AssetsMatchingHelper.Matching(matchingParas)) { if (AssetsMatchingParasHelper.Apply(hydroInfo, matchingParas)) { feedBackMsg?.Invoke("产åå¹é æåããã", Color.Green); } else { feedBackMsg?.Invoke("产åå¹é 失败ï¼ï¼ï¼", Color.Red); } } else { feedBackMsg?.Invoke("产åå¹é 失败ï¼ï¼ï¼", Color.Red); } hydroId = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.Save(hydroInfo); feedBackMsg?.Invoke("æ°´åç»ææä»¶è§£ææåããã", Color.Green); feedBackProgress?.Invoke(100, 30); WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs
@@ -105,19 +105,14 @@ { return false; } var vmPump = propViewModel as HydroPumpPropertyViewModel; var modelType = vmPump.ModelType; var dbId = vmPump.DbId; var curveDbId = string.Empty; if (!string.IsNullOrEmpty(vmPump.CurveQH)) { var curveQh = hydroInfo.Curves?.Find(x => x.Code == vmPump.CurveQH); curveDbId = curveQh?.DbId; } var pumpInfo = hydroInfo.Pumps?.Find(x => x.Code == propViewModel.Code); var input = AssetsMatchingParasHelper.CreatePump(hydroInfo, pumpInfo); var dlg = new PumpMainCurveChoiceDlg(); // dlg.SetBindingData(); dlg.SetBindingData(input); dlg.ReloadDataEvent += (rhs) => { }; dlg.ShowDialog(); return true; WinFrmUI/Yw.WinFrmUI.Bimface.Core/Yw.WinFrmUI.Bimface.Core.csproj
@@ -26,6 +26,7 @@ <ItemGroup> <None Remove="bimface\css\Panel.css" /> <None Remove="bimface\css\Tailwind.css" /> <None Remove="bimface\html\Interop3d.html" /> <None Remove="bimface\js\Background.js" /> <None Remove="bimface\js\CameraStatus.js" /> @@ -48,6 +49,9 @@ <Content Include="bimface\css\Panel.css"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="bimface\css\Tailwind.css"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> <Content Include="bimface\html\Interop3d.html"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/css/Tailwind.css
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,109 @@ .space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5px; } .space-x-8 > :not([hidden]) ~ :not([hidden]) { margin-left: 8px; } .p-x-8 { --offset: 8px; padding-left: var(--offset); padding-right: var(--offset); } /* flex å¸å± --------------------------------------------------------- */ .flex { display: flex; } .flex-col { flex-direction: column; } .justify-start { justify-content: flex-start; } .justify-end { justify-content: flex-end; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .justify-around { justify-content: space-around; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; } .items-center { align-items: center; } /* åè§ --------------------------------------------------------- */ .rounded-none { border-radius: 0px; } .rounded-sm { border-radius: 0.125rem; /* 2px */ } .rounded { border-radius: 0.25rem; /* 4px */ } .rounded-md { border-radius: 0.375rem; /* 6px */ } .rounded-lg { border-radius: 0.5rem; /* 8px */ } .rounded-xl { border-radius: 0.75rem; /* 12px */ } .rounded-2xl { border-radius: 1rem; /* 16px */ } .rounded-3xl { border-radius: 1.5rem; /* 24px */ } .rounded-full { border-radius: 9999px; } .w-fit { width: fit-content; } .text-nowrap { text-wrap: nowrap; } WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/html/Interop3d.html
@@ -27,13 +27,14 @@ flex: 1; } </style> <link href="css/Panel.css" rel="stylesheet" /> <link href="../css/Tailwind.css" rel="stylesheet" /> <!-- å¼ç¨BIMFACEçJavaScriptæ¾ç¤ºç»ä»¶åº --> <script src="https://static.bimface.com/api/BimfaceSDKLoader/BimfaceSDKLoader@latest-release.js" charset="utf-8"></script> <script type="text/javascript" src="https://spump.oss-cn-shanghai.aliyuncs.com/assets/jq/jquery-3.3.1.min.js"></script> </head> <body> <div class='main'> <h1>ceshi</h1> <div class='model' id="domId"></div> </div> WinFrmUI/Yw.WinFrmUI.Bimface.Core/bimface/js/CustomLabels.js
@@ -21,29 +21,29 @@ } //æ·»å èªå®ä¹æ ç¾é¡¹ function addCustomLabelItem(item) { let content = document.createElement('div'); content.style.width = '110px'; content.style.height = 'auto'; content.style.border = 'solid'; content.style.borderColor = '#FFFFFF'; content.style.padding = '2px'; content.style.borderWidth = '1px'; content.style.borderRadius = '3px'; content.style.background = '#32D3A6'; content.innerHTML = getTdHtml(item.data); content.style.color = '#FFFFFF'; content.style.fontSize = '10px'; //content.style.textAlign = 'center'; content.style.lineHeight = '14px'; let config = new Glodon.Bimface.Plugins.Drawable.CustomItemConfig(); config.content = content; config.viewer = _viewer; config.opacity = 1; config.worldPosition = _modeler.getBoundingBoxById(item.id).min; let customLabelItem = new Glodon.Bimface.Plugins.Drawable.CustomItem(config); _drawableContainer.addItem(customLabelItem); } //function addCustomLabelItem(item) { // let content = document.createElement('div'); // content.style.width = '110px'; // content.style.height = 'auto'; // content.style.border = 'solid'; // content.style.borderColor = '#FFFFFF'; // content.style.padding = '2px'; // content.style.borderWidth = '1px'; // content.style.borderRadius = '3px'; // content.style.background = '#32D3A6'; // content.innerHTML = getTdHtml(item.data); // content.style.color = '#FFFFFF'; // content.style.fontSize = '10px'; // //content.style.textAlign = 'center'; // content.style.lineHeight = '14px'; // let config = new Glodon.Bimface.Plugins.Drawable.CustomItemConfig(); // config.content = content; // config.viewer = _viewer; // config.opacity = 1; // config.worldPosition = _modeler.getBoundingBoxById(item.id).min; // let customLabelItem = new Glodon.Bimface.Plugins.Drawable.CustomItem(config); // _drawableContainer.addItem(customLabelItem); //} //æ¸ é¤èªå®ä¹æ ç¾ @@ -55,17 +55,53 @@ } //è·åæ°æ®å 容html //function getTdHtml(data) { // if (data == null || data.length < 1) { // return ''; // } // let html = '<table>'; // data.forEach(d => { // html += '<tr><td style="width:50px">' + d.name + '</td><td style="width:40px">' + d.value + '</td><td>' + d.unit + '</td></tr>' // }); // return html += '</table>'; //} //æ·»å èªå®ä¹æ ç¾é¡¹ function addCustomLabelItem(item) { let content = document.createElement('div'); content.className = 'w-fit rounded-md space-y-1.5 text-nowrap flex flex-col'; content.style.color = 'white'; content.style.backgroundColor = '#32d3a6'; content.style.padding = '5px'; content.innerHTML = getTdHtml(item.data); let config = new Glodon.Bimface.Plugins.Drawable.CustomItemConfig(); config.content = content; config.viewer = _viewer; config.opacity = 1; config.worldPosition = _modeler.getBoundingBoxById(item.id).min; let customLabelItem = new Glodon.Bimface.Plugins.Drawable.CustomItem(config); _drawableContainer.addItem(customLabelItem); } //è·åæ°æ®å 容html function getTdHtml(data) { if (data == null || data.length < 1) { return ''; } let html = '<table>'; data.forEach(d => { html += '<tr><td style="width:50px">' + d.name + '</td><td style="width:40px">' + d.value + '</td><td>' + d.unit + '</td></tr>' let html = ''; data.forEach((d) => { html += ` <div class="flex justify-between items-center"> <span>${d.name}</span> <span class="p-x-8">${d.value}</span> <span>${d.unit}</span> </div>`; }); return html += '</table>'; return html; }