Desktop/HStation.Desktop.Xhs.Core/Program.cs
@@ -29,11 +29,11 @@ System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("zh-Hans"); //å¤çæªæè·çå¼å¸¸ //Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); //å¤çUI线ç¨å¼å¸¸ //Application.ThreadException += Application_ThreadException; Application.ThreadException += Application_ThreadException; //å¤çéUI线ç¨å¼å¸¸ //AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj
@@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Yw.Service.Hydro.Core" Version="3.8.9" /> <PackageReference Include="Yw.Service.Hydro.Core" Version="3.9.0" /> </ItemGroup> <ItemGroup> Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj
@@ -8,7 +8,7 @@ <ItemGroup> <PackageReference Include="Yw.Geometry.Core" Version="3.2.9" /> <PackageReference Include="Yw.Service.Hydro.Core" Version="3.8.6" /> <PackageReference Include="Yw.Service.Hydro.Core" Version="3.9.0" /> </ItemGroup> <ItemGroup> WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs
@@ -59,7 +59,7 @@ /// </summary> public event Action<HydroVisualInfo> FlowEffectPropertyValueChangedEvent; #endregion äºä»¶é #endregion #region 屿§èµå¼ @@ -81,7 +81,12 @@ set { this.hydroVisualPropertyCtrl1.SelectedObject = value; } } #endregion 屿§èµå¼ /// <summary> /// 计ç®ç»æ /// </summary> public Func<HydroCalcuResult> CalcuResult { get; set; } #endregion #region 屿§æ´æ° @@ -115,7 +120,7 @@ this.hydroVisualPropertyCtrl1.UpdateRows(); } #endregion 屿§æ´æ° #endregion #region äºä»¶å®ç° @@ -455,7 +460,7 @@ pumpViewModel.UpdateProperty(); this.hydroVisualPropertyCtrl1.UpdateRows(); }; dlg.SetBindingData(pumpViewModel); dlg.SetBindingData(pumpViewModel, this.CalcuResult?.Invoke()); dlg.ShowDialog(); } break; @@ -512,7 +517,7 @@ } } #endregion äºä»¶å®ç° #endregion #region äºä»¶ç©¿é @@ -560,6 +565,8 @@ this.FlowEffectPropertyValueChangedEvent?.Invoke(vm?.Vmo); } #endregion äºä»¶ç©¿é #endregion } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/05-function/SimulationFunctionCtrl.cs
@@ -279,7 +279,8 @@ } } var overlay = this.ShowOverlay(); WaitFormHelper.ShowWaitForm(this.FindForm(), "æ£å¨å è½½æ¨¡åæ°æ®ï¼è¯·ç¨å..."); //var overlay = this.ShowOverlay(); if (!_gettingHydroInfoDict.TryAdd(key, true)) { _gettingHydroInfoDict[key] = true; @@ -303,8 +304,8 @@ //var hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(relation.ModelID); var hydroInfo = await HStation.BLL.XhsHydroInfo.GetByID(relation.ModelID); _gettingHydroInfoDict[key] = false; overlay.Close(); //overlay.Close(); WaitFormHelper.HideWaitForm(); return hydroInfo; } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -1,4 +1,5 @@ using Castle.Core.Logging; using DevExpress.CodeParser; using DevExpress.Diagram.Core.Native; using DevExpress.Mvvm.Native; using DevExpress.Utils.MVVM; @@ -236,13 +237,13 @@ } if (_bimfaceCtrl == null) { var overlay = this.ShowOverlay(); _bimfaceCtrl = new SimulationBimfaceCtrl(); _bimfaceCtrl.Dock = DockStyle.Fill; WaitFormHelper.ShowWaitForm(this.FindForm(), "æ£å¨å 载模åï¼è¯·ç¨å..."); await _bimfaceCtrl.InitialData(_project, _projectSite); _bimfaceCtrl.LoadCompletedEvent += () => {//viewå è½½å®æäºä»¶ overlay.Close(); WaitFormHelper.HideWaitForm(); this.barCkDecorator.Checked = false; this.barCkGrading.Checked = true; }; @@ -320,6 +321,7 @@ _propertyCtrl = new SimulationPropertyCtrl(); _propertyCtrl.Dock = DockStyle.Fill; _propertyCtrl.AllowEdit = true; _propertyCtrl.CalcuResult = () => GetCalcuResult(); _propertyCtrl.HydroViewEvent += (visual) => { SelectVisual(visual, eSimulationVisualSource.Property); @@ -1929,7 +1931,7 @@ return; } var monitorHelper = GetMonitorHelper(); var allMonitorList = await monitorHelper.GetAll(); var allMonitorList = await monitorHelper.GetAnalyseList(); var dlg = new SetHydroMonitorAnalyseListDlg(); dlg.ReloadDataEvent += async (list) => { @@ -2691,7 +2693,7 @@ this.docPnlBottom.Text = "çæµåæ"; this.docPnlBottom.Height = 350; } var allMontorList = await GetMonitorList(); var allMontorList = await GetMonitorAnalyseList(); if (allWorkingList == null || allWorkingList.Count < 1) { monitorAnalyListCtrl.SetBindingData(_hydroInfo, allMontorList, GetCalcuResult()); WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatCtrl.cs
@@ -12,6 +12,7 @@ using System.Windows.Forms; using Yw.Geometry; using Yw.Pump; using Yw.Vmo; using Yw.WinFrmUI.Phart; namespace HStation.WinFrmUI @@ -35,12 +36,19 @@ private Yw.Model.HydroModelInfo _hydroInfo = null; private Yw.Model.HydroPumpInfo _pumpInfo = null; private HydroCalcuResult _calcuResult = null; private double _head = 0;// /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo) public void SetBindingData ( Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo, HydroCalcuResult calcuResult ) { if (hydroInfo == null) { @@ -52,10 +60,32 @@ } _hydroInfo = hydroInfo; _pumpInfo = pumpInfo; _calcuResult = calcuResult; _head = _hydroInfo.GetHead(); this.hydroSinglePumpListExtendGridCtrl1.SetBindingData(pumpInfo); var allStateList = this.hydroSinglePumpListExtendGridCtrl1.GetStateList(); var vm = CreateViewModel(allStateList); this.pumpOperationChart1.SetBindingData(vm); if (calcuResult != null) { var allCalcuVisualDict = calcuResult.GetVisualDict(); var calcuVisualResult = allCalcuVisualDict?.GetValue(pumpInfo.Code) as HydroCalcuPumpResult; if (calcuVisualResult != null) { if (calcuVisualResult.CalcuQ.HasValue) { this.txtDesignQ.EditValue = Math.Round(calcuVisualResult.CalcuQ.Value, 1); } if (calcuVisualResult.CalcuH.HasValue) { this.txtDesignH.EditValue = Math.Round(calcuVisualResult.CalcuH.Value, 2); } if (calcuVisualResult.CalcuQ.HasValue && calcuVisualResult.CalcuH.HasValue) { Design(); } } } } //ç¶ææ¹åäºä»¶ @@ -184,6 +214,12 @@ //è®¾è®¡ç¹ private void btnDesign_Click(object sender, EventArgs e) { Design(); } //设计 private void Design() { var qtext = this.txtDesignQ.Text.Trim(); if (string.IsNullOrEmpty(qtext)) { @@ -198,7 +234,7 @@ } var q = double.Parse(qtext); var h = double.Parse(htext); this.pumpOperationChart1.SetDesignPoint(q, h); this.pumpOperationChart1.SetDesignPoint(q, h, _head); } /// <summary> WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatDlg.cs
@@ -22,21 +22,26 @@ /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(HydroPumpViewModel pumpViewModel) public void SetBindingData(HydroPumpViewModel pumpViewModel, HydroCalcuResult calcuResult) { if (pumpViewModel == null) { return; } SetBindingData(pumpViewModel.HydroInfo, pumpViewModel.Vmo); SetBindingData(pumpViewModel.HydroInfo, pumpViewModel.Vmo, calcuResult); } /// <summary> /// ç»å®æ°æ® /// </summary> public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo) public void SetBindingData ( Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo, HydroCalcuResult calcuResult ) { this.simulationSinglePumpFeatCtrl1.SetBindingData(hydroInfo, pumpInfo); this.simulationSinglePumpFeatCtrl1.SetBindingData(hydroInfo, pumpInfo, calcuResult); } private void SimulationPumpFeatDlg_FormClosing(object sender, FormClosingEventArgs e) WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.Designer.cs
@@ -112,7 +112,7 @@ barTxtQ.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right; barTxtQ.Caption = "æµé:"; barTxtQ.Edit = repositoryItemTextEdit1; barTxtQ.EditWidth = 80; barTxtQ.EditWidth = 100; barTxtQ.Id = 3; barTxtQ.Name = "barTxtQ"; barTxtQ.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph; @@ -129,7 +129,7 @@ barTxtH.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right; barTxtH.Caption = "æ¬ç¨:"; barTxtH.Edit = repositoryItemTextEdit2; barTxtH.EditWidth = 80; barTxtH.EditWidth = 100; barTxtH.Id = 5; barTxtH.Name = "barTxtH"; barTxtH.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph; @@ -146,7 +146,7 @@ barTxtP.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right; barTxtP.Caption = "åç:"; barTxtP.Edit = repositoryItemTextEdit3; barTxtP.EditWidth = 80; barTxtP.EditWidth = 100; barTxtP.Id = 6; barTxtP.Name = "barTxtP"; barTxtP.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph; @@ -163,7 +163,7 @@ barTxtE.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right; barTxtE.Caption = "æç:"; barTxtE.Edit = repositoryItemTextEdit4; barTxtE.EditWidth = 80; barTxtE.EditWidth = 100; barTxtE.Id = 7; barTxtE.Name = "barTxtE"; barTxtE.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph; @@ -181,7 +181,7 @@ barDockControlTop.Dock = DockStyle.Top; barDockControlTop.Location = new Point(0, 0); barDockControlTop.Manager = barManager1; barDockControlTop.Size = new Size(818, 24); barDockControlTop.Size = new Size(907, 24); // // barDockControlBottom // @@ -189,7 +189,7 @@ barDockControlBottom.Dock = DockStyle.Bottom; barDockControlBottom.Location = new Point(0, 535); barDockControlBottom.Manager = barManager1; barDockControlBottom.Size = new Size(818, 0); barDockControlBottom.Size = new Size(907, 0); // // barDockControlLeft // @@ -203,7 +203,7 @@ // barDockControlRight.CausesValidation = false; barDockControlRight.Dock = DockStyle.Right; barDockControlRight.Location = new Point(818, 24); barDockControlRight.Location = new Point(907, 24); barDockControlRight.Manager = barManager1; barDockControlRight.Size = new Size(0, 511); // @@ -213,7 +213,10 @@ pumpRunViewChart1.Location = new Point(0, 24); pumpRunViewChart1.Margin = new Padding(2, 2, 2, 2); pumpRunViewChart1.Name = "pumpRunViewChart1"; pumpRunViewChart1.Size = new Size(818, 511); pumpRunViewChart1.QEVisible = true; pumpRunViewChart1.QPVisble = true; pumpRunViewChart1.RunPointVisible = true; pumpRunViewChart1.Size = new Size(907, 511); pumpRunViewChart1.TabIndex = 4; // // SimulationPumpAnalyChartCtrl @@ -226,7 +229,7 @@ Controls.Add(barDockControlBottom); Controls.Add(barDockControlTop); Name = "SimulationPumpAnalyChartCtrl"; Size = new Size(818, 535); Size = new Size(907, 535); ((ISupportInitialize)barManager1).EndInit(); ((ISupportInitialize)repositoryItemTextEdit1).EndInit(); ((ISupportInitialize)repositoryItemTextEdit2).EndInit(); WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs
@@ -20,6 +20,7 @@ public SimulationPumpAnalyChartCtrl() { InitializeComponent(); this.pumpRunViewChart1.RunPointSelectedEvent += PumpRunViewChart1_RunPointSelectedEvent; } private Yw.Model.HydroModelInfo _hydroInfo = null;//æ°´åä¿¡æ¯ @@ -344,6 +345,11 @@ this.pumpRunViewChart1.SetChartAxis(); } private void PumpRunViewChart1_RunPointSelectedEvent(PumpRunViewItemViewModel obj) { SetCurrent(obj); } } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/04-working/SimulationPumpSingleWorkingChartCtrl.cs
@@ -97,92 +97,13 @@ vm.CurveName = $"è£ ç½®çº¿"; vm.Color = Color.Black; var head = _hydroInfo.GetHead(); var pipeQ = _hydroInfo.GetPipeQ(_allCalcuResultVisualDict); var pipeH = _hydroInfo.GetPipeHead(_allCalcuResultVisualDict); double startHeadValue = 0; var startSourceMonitor = _allMonitorList? .Matching(HydroVisualCalcuProp.CalcuHead, new List<string>() { HStation.Xhs.Flags.æ°´æº,HStation.Xhs.Flags.å§ç«¯,HStation.Xhs.Flags.é»è®¤}); if (startSourceMonitor == null) { startSourceMonitor = _allMonitorList? .Matching(HydroVisualCalcuProp.CalcuHead, new List<string>() { HStation.Xhs.Flags.æ°´æº,HStation.Xhs.Flags.å§ç«¯}); } if (startSourceMonitor != null) { var startSourceCalcuResult = _allCalcuResultVisualDict?.GetValue(startSourceMonitor.Relation); if (startSourceCalcuResult != null) { var startHead = startSourceCalcuResult.GetCalcuValue(startSourceMonitor.PropName); if (startHead.HasValue) { startHeadValue = startHead.Value; } } } var endSourceMonitor = _allMonitorList? .Matching(HydroVisualCalcuProp.CalcuHead, new List<string>() { HStation.Xhs.Flags.æ°´æº,HStation.Xhs.Flags.æ«ç«¯,HStation.Xhs.Flags.é»è®¤}); if (endSourceMonitor == null) { endSourceMonitor = _allMonitorList? .Matching(HydroVisualCalcuProp.CalcuHead, new List<string>() { HStation.Xhs.Flags.æ°´æº,HStation.Xhs.Flags.æ«ç«¯}); } if (endSourceMonitor != null) { var endSouceCalcuResult = _allCalcuResultVisualDict?.GetValue(endSourceMonitor.Relation); if (endSouceCalcuResult != null) { var endHead = endSouceCalcuResult.GetCalcuValue(endSourceMonitor.PropName); if (endHead.HasValue) { vm.StartH = Math.Round(endHead.Value - startHeadValue, 2); } } } var outPipeFlowMonitor = _allMonitorList?.Matching(HydroVisualCalcuProp.CalcuFlow, new List<string>() { HStation.Xhs.Flags.æ»ç®¡,HStation.Xhs.Flags.åºå£,HStation.Xhs.Flags.é»è®¤}); if (outPipeFlowMonitor == null) { outPipeFlowMonitor = _allMonitorList?.Matching(HydroVisualCalcuProp.CalcuFlow, new List<string>() { HStation.Xhs.Flags.æ»ç®¡,HStation.Xhs.Flags.åºå£}); } if (outPipeFlowMonitor != null) { var outPipeFlowCalcuResult = _allCalcuResultVisualDict?.GetValue(outPipeFlowMonitor.Relation); if (outPipeFlowCalcuResult != null) { var outPipeFlow = outPipeFlowCalcuResult.GetCalcuValue(outPipeFlowMonitor.PropName); if (outPipeFlow.HasValue) { vm.PipeQ = Math.Round(outPipeFlow.Value, 1); } } } var outPipeHeadMonitor = _allMonitorList?.Matching(HydroVisualCalcuProp.CalcuHead, new List<string>() { HStation.Xhs.Flags.æ»ç®¡,HStation.Xhs.Flags.åºå£,HStation.Xhs.Flags.é»è®¤}); if (outPipeHeadMonitor == null) { outPipeHeadMonitor = _allMonitorList?.Matching(HydroVisualCalcuProp.CalcuHead, new List<string>() { HStation.Xhs.Flags.æ»ç®¡,HStation.Xhs.Flags.åºå£}); } if (outPipeHeadMonitor != null) { var outPipeHeadCalcuResult = _allCalcuResultVisualDict?.GetValue(outPipeHeadMonitor.Relation); if (outPipeHeadCalcuResult != null) { var outPipeHead = outPipeHeadCalcuResult.GetCalcuValue(outPipeHeadMonitor.PropName); if (outPipeHead.HasValue) { vm.PipeH = Math.Round(outPipeHead.Value - startHeadValue, 2); } } } vm.StartH = head; vm.PipeQ = pipeQ ?? 0; vm.PipeH = pipeH ?? 0; if (_hydroInfo.Pumps != null && _hydroInfo.Pumps.Count > 0) { WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroModelInfoExtensions.cs
@@ -1,4 +1,5 @@ using Yw.EPAnet; using DevExpress.Drawing.Internal.Interop; using Yw.EPAnet; using Yw.Hydro; using Yw.Model; @@ -15,9 +16,8 @@ private const double _pipe_diameter_default = 500;//管éé»è®¤ç´å¾ private const double _pipe_roughness_default = 110;//管éé»è®¤ç²ç³ç³»æ° private const double _pipe_minorloss_default = 0.1;//管éé»è®¤ç²ç³ç³»æ° //éé¨é»è®¤å±é»ç³»æ° private const double _valve_minorloss_default = 0.3d; private const double _valve_minorloss_default = 0.3d; //éé¨é»è®¤å±é»ç³»æ° private const double _resistance_minorloss_default = 9d;//é»ä»¶é»è®¤å±é»ç³»æ° /// <summary> /// ä¿®å¤åæ° @@ -175,8 +175,235 @@ } } //é»ä»¶ var allResistanceList = hydroInfo.GetAllResistances(); if (allResistanceList != null && allResistanceList.Count > 0) { foreach (var resistance in allResistanceList) { if (resistance.MinorLoss <= 0) { resistance.MinorLoss = _resistance_minorloss_default; resistance.UpdatePropStatus(nameof(resistance.MinorLoss), ePropStatus.Lack, $"å±é»ç³»æ°ç¼ºçï¼ä½¿ç¨é»è®¤å¼ã{_resistance_minorloss_default}ãä¿®å¤"); } var startNode = allNodes.Find(x => x.Code == resistance.StartCode); if (startNode != null) { var startPipe = allLinks.Find(x => x.EndCode == startNode.Code) as Yw.Model.HydroPipeInfo; if (startPipe != null) { resistance.Diameter = startPipe.Diameter; resistance.UpdatePropStatus(nameof(resistance.Diameter), ePropStatus.Lack, $"ç´å¾ä½¿ç¨ä¸æ¸¸ç®¡éã{startPipe.Code}ãä¿®å¤"); } else { var endNode = allNodes.Find(x => x.Code == resistance.EndCode); if (endNode != null) { var endPipe = allLinks.Find(x => x.StartCode == endNode.Code) as Yw.Model.HydroPipeInfo; if (endPipe != null) { resistance.Diameter = endPipe.Diameter; resistance.UpdatePropStatus(nameof(resistance.Diameter), ePropStatus.Lack, $"ç´å¾ä½¿ç¨ä¸æ¸¸ç®¡éã{endPipe.Code}ãä¿®å¤"); } } } } } } } #endregion #region è£ ç½®è®¡ç® /// <summary> /// è·åæ¬ç¨ /// </summary> public static double GetHead(this Yw.Model.HydroModelInfo hydroInfo) { if (hydroInfo == null) { return default; } double startHeadValue = 0; var allSourceList = hydroInfo.GetAllSources(); if (allSourceList != null && allSourceList.Count > 0) { var startSource = allSourceList.Matching(new List<string>() { Yw.Hydro.Flags.æ°´æº, Yw.Hydro.Flags.å§ç«¯, Yw.Hydro.Flags.é»è®¤ }); if (startSource == null) { startSource = allSourceList.Matching(new List<string>() { Yw.Hydro.Flags.æ°´æº, Yw.Hydro.Flags.å§ç«¯ }); } if (startSource != null) { if (startSource is HydroTankInfo tank) { startHeadValue = tank.PoolElev + tank.InitLevel; } } } double endHeadValue = 0; var allNodeList = hydroInfo.GetAllNodes(); if (allNodeList != null && allNodeList.Count > 0) { var endSource = allNodeList.Matching(new List<string>() { Yw.Hydro.Flags.æ°´æº, Yw.Hydro.Flags.æ«ç«¯, Yw.Hydro.Flags.é»è®¤ }); if (endSource == null) { endSource = allSourceList.Matching(new List<string>() { Yw.Hydro.Flags.æ°´æº, Yw.Hydro.Flags.æ«ç«¯ }); } if (endSource != null) { if (endSource is HydroTankInfo tank) { endHeadValue = tank.PoolElev + tank.InitLevel; } else if (endSource is HydroEmitterInfo emitter) { endHeadValue = emitter.Elev; } } } return endHeadValue - startHeadValue; } /// <summary> /// è·åæ»ç®¡æµé /// </summary> public static double? GetPipeQ(this Yw.Model.HydroModelInfo hydroInfo, HydroCalcuResult calcuResult) { return GetPipeQ(hydroInfo, calcuResult?.GetVisualDict()); } /// <summary> /// è·åæ»ç®¡æµé /// </summary> public static double? GetPipeQ(this Yw.Model.HydroModelInfo hydroInfo, Dictionary<string, HydroCalcuVisualResult> allCalcuVisualDict) { if (hydroInfo == null) { return default; } if (allCalcuVisualDict == null || allCalcuVisualDict.Count < 1) { return default; } var allLinkList = hydroInfo.GetAllLinks(); if (allLinkList == null || allLinkList.Count < 1) { return default; } var link = allLinkList.Matching(new List<string>() { Yw.Hydro.Flags.æ»ç®¡, Yw.Hydro.Flags.åºå£, Yw.Hydro.Flags.é»è®¤ }); if (link == null) { link = allLinkList.Matching(new List<string>() { Yw.Hydro.Flags.æ»ç®¡, Yw.Hydro.Flags.åºå£ }); } if (link == null) { return default; } var calcuVisualResult = allCalcuVisualDict.GetValue(link.Code); if (calcuVisualResult == null) { return default; } var calcuValue = calcuVisualResult.GetCalcuValue(Yw.Hydro.VisualCalcuProp.CalcuFlow); if (calcuValue == null) { return default; } return Math.Round(Math.Abs(calcuValue.Value), 1); } /// <summary> /// è·åæ»ç®¡ååï¼ç»å¯¹ååï¼ /// </summary> public static double? GetPipeHead(this Yw.Model.HydroModelInfo hydroInfo, HydroCalcuResult calcuResult) { return GetPipeHead(hydroInfo, calcuResult?.GetVisualDict()); } /// <summary> /// è·åæ»ç®¡ååï¼ç»å¯¹ååï¼ /// </summary> public static double? GetPipeHead(this Yw.Model.HydroModelInfo hydroInfo, Dictionary<string, HydroCalcuVisualResult> allCalcuVisualDict) { if (hydroInfo == null) { return default; } if (allCalcuVisualDict == null || allCalcuVisualDict.Count < 1) { return default; } var allNodeList = hydroInfo.GetAllNodes(); if (allNodeList == null || allNodeList.Count < 1) { return default; } var node = allNodeList.Matching(new List<string>() { Yw.Hydro.Flags.æ»ç®¡, Yw.Hydro.Flags.åºå£, Yw.Hydro.Flags.é»è®¤ }); if (node == null) { node = allNodeList.Matching(new List<string>() { Yw.Hydro.Flags.æ»ç®¡, Yw.Hydro.Flags.åºå£ }); } if (node == null) { return default; } var calcuVisualResult = allCalcuVisualDict.GetValue(node.Code); if (calcuVisualResult == null) { return default; } var calcuValue = calcuVisualResult.GetCalcuValue(Yw.Hydro.VisualCalcuProp.CalcuHead); if (calcuValue == null) { return default; } return Math.Round(calcuValue.Value, 2); } #endregion WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroParterInfoExtensions.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,56 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Yw.Model; namespace Yw.WinFrmUI { /// <summary> /// /// </summary> public static class HydroParterInfoExtensions { /// <summary> /// å¹é /// </summary> public static HydroSourceInfo Matching(this List<HydroSourceInfo> allSourceList, List<string> flags) { if (allSourceList == null || allSourceList.Count < 1) { return default; } var sourceList = allSourceList.OrderBy(x => x.Flags.Distinct().Count()).ToList(); return sourceList.Find(x => x.Flags.ContainsC(flags)); } /// <summary> /// å¹é /// </summary> public static HydroNodeInfo Matching(this List<HydroNodeInfo> allNodeList, List<string> flags) { if (allNodeList == null || allNodeList.Count < 1) { return default; } var nodeList = allNodeList.OrderBy(x => x.Flags.Distinct().Count()).ToList(); return nodeList.Find(x => x.Flags.ContainsC(flags)); } /// <summary> /// å¹é /// </summary> public static HydroLinkInfo Matching(this List<HydroLinkInfo> allLinkList, List<string> flags) { if (allLinkList == null || allLinkList.Count < 1) { return default; } var linkList = allLinkList.OrderBy(x => x.Flags.Distinct().Count()).ToList(); return linkList.Find(x => x.Flags.ContainsC(flags)); } } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.Designer.cs
@@ -29,37 +29,36 @@ private void InitializeComponent() { components = new Container(); ComponentResourceManager resources = new ComponentResourceManager(typeof(HydroTankListCtrl)); DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); ComponentResourceManager resources = new ComponentResourceManager(typeof(HydroTankListCtrl)); hydroTankViewModelBindingSource = new BindingSource(components); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); generalSearchAndSetCtrl1 = new GeneralSearchAndSetCtrl(); gridControl1 = new DevExpress.XtraGrid.GridControl(); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); colSet = new DevExpress.XtraGrid.Columns.GridColumn(); repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); colDbLocked = new DevExpress.XtraGrid.Columns.GridColumn(); colCode = new DevExpress.XtraGrid.Columns.GridColumn(); colName = new DevExpress.XtraGrid.Columns.GridColumn(); colCode = new DevExpress.XtraGrid.Columns.GridColumn(); colModelType = new DevExpress.XtraGrid.Columns.GridColumn(); colHasDb = new DevExpress.XtraGrid.Columns.GridColumn(); colPoolElev = new DevExpress.XtraGrid.Columns.GridColumn(); colInitLevel = new DevExpress.XtraGrid.Columns.GridColumn(); colMinLevel = new DevExpress.XtraGrid.Columns.GridColumn(); colMaxLevel = new DevExpress.XtraGrid.Columns.GridColumn(); colDN = new DevExpress.XtraGrid.Columns.GridColumn(); colMinVol = new DevExpress.XtraGrid.Columns.GridColumn(); colCurve = new DevExpress.XtraGrid.Columns.GridColumn(); colOverFlow = new DevExpress.XtraGrid.Columns.GridColumn(); colHasDb = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); colFlags = new DevExpress.XtraGrid.Columns.GridColumn(); colCalcuPress = new DevExpress.XtraGrid.Columns.GridColumn(); colCalcuHead = new DevExpress.XtraGrid.Columns.GridColumn(); colCalcuDemand = new DevExpress.XtraGrid.Columns.GridColumn(); colFlags = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); colSet = new DevExpress.XtraGrid.Columns.GridColumn(); repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); txtName = new DevExpress.XtraEditors.TextEdit(); txtModelType = new DevExpress.XtraEditors.TextEdit(); txtCode = new DevExpress.XtraEditors.TextEdit(); @@ -90,7 +89,7 @@ // // hydroTankViewModelBindingSource // hydroTankViewModelBindingSource.DataSource = typeof(HydroElbowViewModel); hydroTankViewModelBindingSource.DataSource = typeof(HydroTankViewModel); // // layoutControl1 // @@ -129,31 +128,10 @@ // // gridView1 // gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colName, colCode, colModelType, colPoolElev, colInitLevel, colMinLevel, colMaxLevel, colDN, colMinVol, colCurve, colOverFlow, colHasDb, colDescription, colFlags, colCalcuPress, colCalcuHead, colCalcuDemand, colSet }); gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colName, colCode, colModelType, colPoolElev, colInitLevel, colMinLevel, colMaxLevel, colDN, colMinVol, colOverFlow, colHasDb, colDescription, colFlags, colCalcuPress, colCalcuHead, colCalcuDemand, colSet }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.RowCellClick += gridView1_RowCellClick; // // colSet // colSet.Caption = "设置"; colSet.ColumnEdit = repositoryItemButtonEdit1; colSet.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right; colSet.MaxWidth = 60; colSet.MinWidth = 60; colSet.Name = "colSet"; colSet.Visible = true; colSet.VisibleIndex = 18; colSet.Width = 60; // // repositoryItemButtonEdit1 // repositoryItemButtonEdit1.AutoHeight = false; editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); editorButtonImageOptions1.SvgImageSize = new Size(20, 20); repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "设置", "set", null, DevExpress.Utils.ToolTipAnchor.Default) }); repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; // // colDbLocked // @@ -166,16 +144,6 @@ colDbLocked.VisibleIndex = 0; colDbLocked.Width = 40; // // colCode // colCode.FieldName = "Code"; colCode.MaxWidth = 150; colCode.MinWidth = 100; colCode.Name = "colCode"; colCode.Visible = true; colCode.VisibleIndex = 2; colCode.Width = 100; // // colName // colName.FieldName = "Name"; @@ -186,6 +154,16 @@ colName.VisibleIndex = 1; colName.Width = 100; // // colCode // colCode.FieldName = "Code"; colCode.MaxWidth = 150; colCode.MinWidth = 100; colCode.Name = "colCode"; colCode.Visible = true; colCode.VisibleIndex = 2; colCode.Width = 100; // // colModelType // colModelType.FieldName = "ModelType"; @@ -195,16 +173,6 @@ colModelType.Visible = true; colModelType.VisibleIndex = 3; colModelType.Width = 100; // // colHasDb // colHasDb.FieldName = "HasDb"; colHasDb.MaxWidth = 40; colHasDb.MinWidth = 40; colHasDb.Name = "colHasDb"; colHasDb.Visible = true; colHasDb.VisibleIndex = 12; colHasDb.Width = 40; // // colPoolElev // @@ -266,16 +234,6 @@ colMinVol.VisibleIndex = 9; colMinVol.Width = 100; // // colCurve // colCurve.FieldName = "Curve"; colCurve.MaxWidth = 100; colCurve.MinWidth = 100; colCurve.Name = "colCurve"; colCurve.Visible = true; colCurve.VisibleIndex = 10; colCurve.Width = 100; // // colOverFlow // colOverFlow.FieldName = "OverFlow"; @@ -283,8 +241,37 @@ colOverFlow.MinWidth = 60; colOverFlow.Name = "colOverFlow"; colOverFlow.Visible = true; colOverFlow.VisibleIndex = 11; colOverFlow.VisibleIndex = 10; colOverFlow.Width = 60; // // colHasDb // colHasDb.FieldName = "HasDb"; colHasDb.MaxWidth = 40; colHasDb.MinWidth = 40; colHasDb.Name = "colHasDb"; colHasDb.Visible = true; colHasDb.VisibleIndex = 11; colHasDb.Width = 40; // // colDescription // colDescription.FieldName = "Description"; colDescription.MinWidth = 100; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 13; colDescription.Width = 100; // // colFlags // colFlags.FieldName = "Flags"; colFlags.MaxWidth = 200; colFlags.MinWidth = 100; colFlags.Name = "colFlags"; colFlags.Visible = true; colFlags.VisibleIndex = 12; colFlags.Width = 100; // // colCalcuPress // @@ -296,7 +283,7 @@ colCalcuPress.MinWidth = 100; colCalcuPress.Name = "colCalcuPress"; colCalcuPress.Visible = true; colCalcuPress.VisibleIndex = 15; colCalcuPress.VisibleIndex = 14; colCalcuPress.Width = 100; // // colCalcuHead @@ -309,7 +296,7 @@ colCalcuHead.MinWidth = 100; colCalcuHead.Name = "colCalcuHead"; colCalcuHead.Visible = true; colCalcuHead.VisibleIndex = 16; colCalcuHead.VisibleIndex = 15; colCalcuHead.Width = 100; // // colCalcuDemand @@ -322,27 +309,29 @@ colCalcuDemand.MinWidth = 110; colCalcuDemand.Name = "colCalcuDemand"; colCalcuDemand.Visible = true; colCalcuDemand.VisibleIndex = 17; colCalcuDemand.VisibleIndex = 16; colCalcuDemand.Width = 110; // // colFlags // colSet // colFlags.FieldName = "Flags"; colFlags.MaxWidth = 200; colFlags.MinWidth = 100; colFlags.Name = "colFlags"; colFlags.Visible = true; colFlags.VisibleIndex = 13; colFlags.Width = 100; colSet.Caption = "设置"; colSet.ColumnEdit = repositoryItemButtonEdit1; colSet.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right; colSet.MaxWidth = 60; colSet.MinWidth = 60; colSet.Name = "colSet"; colSet.Visible = true; colSet.VisibleIndex = 17; colSet.Width = 60; // // colDescription // repositoryItemButtonEdit1 // colDescription.FieldName = "Description"; colDescription.MinWidth = 100; colDescription.Name = "colDescription"; colDescription.Visible = true; colDescription.VisibleIndex = 14; colDescription.Width = 100; repositoryItemButtonEdit1.AutoHeight = false; editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); editorButtonImageOptions1.SvgImageSize = new Size(20, 20); repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "设置", "set", null, DevExpress.Utils.ToolTipAnchor.Default) }); repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; // // txtName // @@ -492,7 +481,6 @@ private DevExpress.XtraGrid.Columns.GridColumn colMaxLevel; private DevExpress.XtraGrid.Columns.GridColumn colDN; private DevExpress.XtraGrid.Columns.GridColumn colMinVol; private DevExpress.XtraGrid.Columns.GridColumn colCurve; private DevExpress.XtraGrid.Columns.GridColumn colOverFlow; private DevExpress.XtraGrid.Columns.GridColumn colCalcuPress; private DevExpress.XtraGrid.Columns.GridColumn colCalcuHead; WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.cs
@@ -302,7 +302,6 @@ this.colMaxLevel.Visible = false; this.colDN.Visible = false; this.colMinVol.Visible = false; this.colCurve.Visible = false; this.colOverFlow.Visible = false; this.colCalcuPress.Visible = false; this.colCalcuHead.Visible = false; @@ -329,7 +328,6 @@ this.colMaxLevel.Visible = true; this.colDN.Visible = true; this.colMinVol.Visible = true; this.colCurve.Visible = true; this.colOverFlow.Visible = true; this.colCalcuPress.Visible = false; this.colCalcuHead.Visible = false; @@ -356,7 +354,6 @@ this.colMaxLevel.Visible = true; this.colDN.Visible = true; this.colMinVol.Visible = true; this.colCurve.Visible = true; this.colOverFlow.Visible = true; this.colCalcuPress.Visible = true; this.colCalcuHead.Visible = true; @@ -383,7 +380,6 @@ this.colMaxLevel.Visible = true; this.colDN.Visible = true; this.colMinVol.Visible = true; this.colCurve.Visible = true; this.colOverFlow.Visible = true; this.colCalcuPress.Visible = false; this.colCalcuHead.Visible = false; @@ -410,7 +406,6 @@ this.colMaxLevel.Visible = true; this.colDN.Visible = true; this.colMinVol.Visible = true; this.colCurve.Visible = true; this.colOverFlow.Visible = true; this.colCalcuPress.Visible = true; this.colCalcuHead.Visible = true; WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.Designer.cs
@@ -29,12 +29,12 @@ private void InitializeComponent() { components = new Container(); ComponentResourceManager resources = new ComponentResourceManager(typeof(HydroWaterboxListCtrl)); DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); ComponentResourceManager resources = new ComponentResourceManager(typeof(HydroWaterboxListCtrl)); gridControl1 = new DevExpress.XtraGrid.GridControl(); hydroWaterboxViewModelBindingSource = new BindingSource(components); gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); @@ -49,10 +49,10 @@ colMaxLevel = new DevExpress.XtraGrid.Columns.GridColumn(); colDN = new DevExpress.XtraGrid.Columns.GridColumn(); colMinVol = new DevExpress.XtraGrid.Columns.GridColumn(); colCurve = new DevExpress.XtraGrid.Columns.GridColumn(); colOverFlow = new DevExpress.XtraGrid.Columns.GridColumn(); colFlags = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); colCalcuL = new DevExpress.XtraGrid.Columns.GridColumn(); colSet = new DevExpress.XtraGrid.Columns.GridColumn(); repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); @@ -67,7 +67,7 @@ layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); colCalcuL = new DevExpress.XtraGrid.Columns.GridColumn(); colVolCurve = new DevExpress.XtraGrid.Columns.GridColumn(); ((ISupportInitialize)gridControl1).BeginInit(); ((ISupportInitialize)hydroWaterboxViewModelBindingSource).BeginInit(); ((ISupportInitialize)gridView1).BeginInit(); @@ -103,7 +103,7 @@ // // gridView1 // gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colCode, colName, colModelType, colHasDb, colPoolElev, colInitLevel, colMinLevel, colMaxLevel, colDN, colMinVol, colCurve, colOverFlow, colFlags, colDescription, colCalcuL, colSet }); gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colCode, colName, colModelType, colHasDb, colPoolElev, colInitLevel, colMinLevel, colMaxLevel, colDN, colMinVol, colVolCurve, colOverFlow, colFlags, colDescription, colCalcuL, colSet }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.RowCellClick += gridView1_RowCellClick; @@ -219,16 +219,6 @@ colMinVol.VisibleIndex = 9; colMinVol.Width = 90; // // colCurve // colCurve.FieldName = "Curve"; colCurve.MaxWidth = 80; colCurve.MinWidth = 80; colCurve.Name = "colCurve"; colCurve.Visible = true; colCurve.VisibleIndex = 10; colCurve.Width = 80; // // colOverFlow // colOverFlow.FieldName = "OverFlow"; @@ -236,7 +226,7 @@ colOverFlow.MinWidth = 60; colOverFlow.Name = "colOverFlow"; colOverFlow.Visible = true; colOverFlow.VisibleIndex = 11; colOverFlow.VisibleIndex = 10; colOverFlow.Width = 60; // // colFlags @@ -257,6 +247,19 @@ colDescription.Visible = true; colDescription.VisibleIndex = 14; colDescription.Width = 100; // // colCalcuL // colCalcuL.FieldName = "CalcuL"; colCalcuL.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right; colCalcuL.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("colCalcuL.ImageOptions.SvgImage"); colCalcuL.ImageOptions.SvgImageSize = new Size(16, 16); colCalcuL.MaxWidth = 100; colCalcuL.MinWidth = 100; colCalcuL.Name = "colCalcuL"; colCalcuL.Visible = true; colCalcuL.VisibleIndex = 15; colCalcuL.Width = 100; // // colSet // @@ -407,18 +410,15 @@ layoutControlItem8.TextSize = new Size(0, 0); layoutControlItem8.TextVisible = false; // // colCalcuL // colVolCurve // colCalcuL.FieldName = "CalcuL"; colCalcuL.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right; colCalcuL.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("colCalcuL.ImageOptions.SvgImage"); colCalcuL.ImageOptions.SvgImageSize = new Size(16, 16); colCalcuL.MaxWidth = 100; colCalcuL.MinWidth = 100; colCalcuL.Name = "colCalcuL"; colCalcuL.Visible = true; colCalcuL.VisibleIndex = 15; colCalcuL.Width = 100; colVolCurve.FieldName = "VolCurve"; colVolCurve.MaxWidth = 100; colVolCurve.MinWidth = 100; colVolCurve.Name = "colVolCurve"; colVolCurve.Visible = true; colVolCurve.VisibleIndex = 11; colVolCurve.Width = 100; // // HydroWaterboxListCtrl // @@ -475,11 +475,11 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8; private DevExpress.XtraGrid.Columns.GridColumn colCurve; private DevExpress.XtraGrid.Columns.GridColumn colSet; private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; private GeneralSearchAndSetCtrl generalSearchAndSetCtrl1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraGrid.Columns.GridColumn colCalcuL; private DevExpress.XtraGrid.Columns.GridColumn colVolCurve; } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.cs
@@ -306,7 +306,7 @@ this.colMaxLevel.Visible = false; this.colDN.Visible = false; this.colMinVol.Visible = false; this.colCurve.Visible = false; this.colVolCurve.Visible = false; this.colOverFlow.Visible = false; this.colHasDb.Visible = false; this.colFlags.Visible = true; @@ -331,7 +331,7 @@ this.colMaxLevel.Visible = true; this.colDN.Visible = true; this.colMinVol.Visible = true; this.colCurve.Visible = true; this.colVolCurve.Visible = true; this.colOverFlow.Visible = true; this.colHasDb.Visible = true; this.colFlags.Visible = true; @@ -356,7 +356,7 @@ this.colMaxLevel.Visible = true; this.colDN.Visible = true; this.colMinVol.Visible = true; this.colCurve.Visible = true; this.colVolCurve.Visible = true; this.colOverFlow.Visible = true; this.colHasDb.Visible = true; this.colFlags.Visible = true; @@ -381,7 +381,7 @@ this.colMaxLevel.Visible = true; this.colDN.Visible = true; this.colMinVol.Visible = true; this.colCurve.Visible = true; this.colVolCurve.Visible = true; this.colOverFlow.Visible = true; this.colHasDb.Visible = true; this.colFlags.Visible = true; @@ -406,7 +406,7 @@ this.colMaxLevel.Visible = true; this.colDN.Visible = true; this.colMinVol.Visible = true; this.colCurve.Visible = true; this.colVolCurve.Visible = true; this.colOverFlow.Visible = true; this.colHasDb.Visible = true; this.colFlags.Visible = true; WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/05-analy/HydroWorkingMonitorAnalyListCtrl.cs
@@ -61,13 +61,16 @@ HydroCalcuResult calcuResult ) { _hydroInfo = hydroInfo; _allMonitorList = allMonitorList; _calcuResult = calcuResult; InitialSingleColumns(); InitialSingleDataTable(); var overlay = this.ShowOverlay(); this.bindingSource1.DataSource = _dt; this.bindingSource1.ResetBindings(false); this.gridView1.RefreshData(); overlay.Close(); } /// <summary> @@ -80,13 +83,16 @@ List<HydroWorkingVmo> allWorkingList ) { _hydroInfo = hydroInfo; _allMonitorList = allMonitorList; _allWorkingList = allWorkingList; var overlay = this.ShowOverlay(); InitialMultiColumns(); InitialMultiDataTable(); this.bindingSource1.DataSource = _dt; this.bindingSource1.ResetBindings(false); this.gridView1.RefreshData(); overlay.Close(); } WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.cs
@@ -226,6 +226,7 @@ { axisLabelElement.BackColor = Color.Blue; axisLabelElement.Text = $"{axisLabelElement.AxisValue:N2}"; } foreach (CrosshairElementGroup group in e.CrosshairElementGroups) @@ -244,7 +245,7 @@ groupHeaderElement.TextColor = Color.Green; groupHeaderElement.DXFont = new DXFont("SegoeUI", 12, DXFontStyle.Bold); groupHeaderElement.Text = group.CrosshairElements[0].AxisLabelElement.Text; //groupHeaderElement.Text = group.CrosshairElements[0].AxisLabelElement.Text; foreach (var ele in group.CrosshairElements) { WinFrmUI/Yw.WinFrmUI.Hydro.Core/19-pump/00-core/HydroPumpCurveColorHelper.cs
@@ -8,7 +8,7 @@ //ç¼å private static List<Color> _cache = new List<Color>() { Color.Red, Color.Blue, Color.Green,Color.Fuchsia,Color.Maroon,Color.Bisque, Color.Red, Color.Blue, Color.Green,Color.Fuchsia,Color.Maroon, Color.MidnightBlue, Color.Aquamarine,Color.DodgerBlue, Color.BurlyWood }; WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj
@@ -42,7 +42,7 @@ <ItemGroup> <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> <PackageReference Include="Yw.BLL.Basic.Core" Version="3.3.0" /> <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.7.1" /> <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.7.2" /> <PackageReference Include="Yw.Pump.Core" Version="3.1.7" /> </ItemGroup>