From 97a43bf839f59cdda1641d61706e6e71a0c5e172 Mon Sep 17 00:00:00 2001 From: cloudflight <cloudflight@126.com> Date: 星期二, 24 十二月 2024 23:54:17 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingDlg.cs | 2 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/PumpViewChart.cs | 115 + WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingCtrl.cs | 15 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/03-run-view/PumpRunViewChart.cs | 34 Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj | 2 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/04-working/SimulationPumpSingleWorkingChartCtrl.cs | 91 - WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.Designer.cs | 311 +++++- WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroModelInfoExtensions.cs | 235 +++++ WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.cs | 5 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.designer.cs | 148 +- WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.Designer.cs | 54 WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/05-analy/HydroWorkingMonitorAnalyListCtrl.cs | 10 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs | 10 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/01-operation/PumpOperationChart.cs | 32 WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Resources/pointer.svg | 16 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs | 19 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingDlg.cs | 2 WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.Designer.cs | 150 +- WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroParterInfoExtensions.cs | 56 + WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.cs | 10 WinFrmUI/Yw.WinFrmUI.Hydro.Core/19-pump/00-core/HydroPumpCurveColorHelper.cs | 2 WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/01-helper/ColorHelper.cs | 27 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingCtrl.cs | 15 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.resx | 78 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatDlg.cs | 13 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.Designer.cs | 21 WinFrmUI/Yw.WinFrmUI.Phart.Core/Yw.WinFrmUI.Phart.Core.csproj | 15 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingDlg.cs | 2 WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Properties/Resources.resx | 4 WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/03-grid/PhartDiagramRelationGridViewCtrl.cs | 24 WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.cs | 18 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/02-working-view/PumpWorkingViewChart.cs | 3 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingDlg.cs | 2 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.cs | 57 + WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.designer.cs | 125 ++ WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs | 6 WinFrmUI/Yw.WinFrmUI.Phart.Core/01-viewmodel/01-pump/PumpCurveEquipViewModel.cs | 27 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatCtrl.cs | 40 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/05-function/SimulationFunctionCtrl.cs | 7 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-parallel/PumpParallelChart.cs | 14 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.resx | 21 WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.cs | 470 +++++++-- WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation.WinFrmUI.PhartRelation.Core.csproj.user | 3 Desktop/HStation.Desktop.Xhs.Core/Program.cs | 6 WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj | 2 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.designer.cs | 258 ++-- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingCtrl.cs | 15 /dev/null | 70 - Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj | 2 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingCtrl.cs | 15 WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.resx | 72 51 files changed, 1,888 insertions(+), 863 deletions(-) diff --git a/Desktop/HStation.Desktop.Xhs.Core/Program.cs b/Desktop/HStation.Desktop.Xhs.Core/Program.cs index 712cea3..e2f8428 100644 --- a/Desktop/HStation.Desktop.Xhs.Core/Program.cs +++ b/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); diff --git a/Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj b/Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj index b597b40..bba84af 100644 --- a/Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj +++ b/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> diff --git a/Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj b/Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj index 852f247..cd9ef32 100644 --- a/Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj +++ b/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> diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.Designer.cs index bde672a..7344239 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.Designer.cs @@ -29,38 +29,242 @@ private void InitializeComponent() { components = new System.ComponentModel.Container(); - pumpChart1 = new Yw.WinFrmUI.Phart.PumpViewChart(); + pumpViewChart1 = new Yw.WinFrmUI.Phart.PumpViewChart(); barManager1 = new DevExpress.XtraBars.BarManager(components); + bar1 = new DevExpress.XtraBars.Bar(); + barCekSplitPanel = new DevExpress.XtraBars.BarCheckItem(); + barCekEffVisible = new DevExpress.XtraBars.BarCheckItem(); + barCekPowerVisible = new DevExpress.XtraBars.BarCheckItem(); + barTxtPipeQ = new DevExpress.XtraBars.BarEditItem(); + repTxtPipeQ = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + barTxtPipeHead = new DevExpress.XtraBars.BarEditItem(); + repTxtPipeHead = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + barTxtStartHead = new DevExpress.XtraBars.BarEditItem(); + repTxtStartHead = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); + barBtnSetEqPt = new DevExpress.XtraBars.BarButtonItem(); + barCekEqulEffVisible = new DevExpress.XtraBars.BarCheckItem(); + barCekEqVisible = new DevExpress.XtraBars.BarCheckItem(); + barBtnEqClear = new DevExpress.XtraBars.BarButtonItem(); + bar2 = new DevExpress.XtraBars.Bar(); + barBtnAddVariableSpeedMenu = new DevExpress.XtraBars.BarSubItem(); + barBtnAddVariableSpeedByN = new DevExpress.XtraBars.BarButtonItem(); + barBtnAddVariableSpeedByHz = new DevExpress.XtraBars.BarButtonItem(); + barBtnAddVariableSpeedByPoint = new DevExpress.XtraBars.BarButtonItem(); + barBtnAddEqualEffMenu = new DevExpress.XtraBars.BarSubItem(); + barBtnAddEqualEffByEff = new DevExpress.XtraBars.BarButtonItem(); barDockControlTop = new DevExpress.XtraBars.BarDockControl(); barDockControlBottom = new DevExpress.XtraBars.BarDockControl(); barDockControlLeft = new DevExpress.XtraBars.BarDockControl(); barDockControlRight = new DevExpress.XtraBars.BarDockControl(); - bar1 = new DevExpress.XtraBars.Bar(); - barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); - barCekSplitPanel = new DevExpress.XtraBars.BarCheckItem(); - barCekEffVisible = new DevExpress.XtraBars.BarCheckItem(); - barCekPowerVisible = new DevExpress.XtraBars.BarCheckItem(); ((System.ComponentModel.ISupportInitialize)barManager1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)repTxtPipeQ).BeginInit(); + ((System.ComponentModel.ISupportInitialize)repTxtPipeHead).BeginInit(); + ((System.ComponentModel.ISupportInitialize)repTxtStartHead).BeginInit(); SuspendLayout(); // - // pumpChart1 + // pumpViewChart1 // - pumpChart1.Dock = DockStyle.Fill; - pumpChart1.Location = new Point(0, 33); - pumpChart1.Name = "pumpChart1"; - pumpChart1.Size = new Size(1369, 891); - pumpChart1.TabIndex = 0; + pumpViewChart1.Dock = DockStyle.Fill; + pumpViewChart1.Location = new Point(0, 67); + pumpViewChart1.Name = "pumpViewChart1"; + pumpViewChart1.Size = new Size(1369, 857); + pumpViewChart1.TabIndex = 0; // // barManager1 // - barManager1.Bars.AddRange(new DevExpress.XtraBars.Bar[] { bar1 }); + barManager1.Bars.AddRange(new DevExpress.XtraBars.Bar[] { bar1, bar2 }); barManager1.DockControls.Add(barDockControlTop); barManager1.DockControls.Add(barDockControlBottom); barManager1.DockControls.Add(barDockControlLeft); barManager1.DockControls.Add(barDockControlRight); barManager1.Form = this; - barManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { barButtonItem1, barCekSplitPanel, barCekEffVisible, barCekPowerVisible }); - barManager1.MaxItemId = 4; + barManager1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { barCekSplitPanel, barCekEffVisible, barCekPowerVisible, barTxtStartHead, barTxtPipeQ, barTxtPipeHead, barBtnSetEqPt, barCekEqVisible, barCekEqulEffVisible, barBtnEqClear, barBtnAddVariableSpeedMenu, barBtnAddVariableSpeedByN, barBtnAddVariableSpeedByHz, barBtnAddVariableSpeedByPoint, barBtnAddEqualEffMenu, barBtnAddEqualEffByEff }); + barManager1.MainMenu = bar2; + barManager1.MaxItemId = 25; + barManager1.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] { repTxtStartHead, repTxtPipeQ, repTxtPipeHead }); + // + // bar1 + // + bar1.BarName = "Tools"; + bar1.DockCol = 0; + bar1.DockRow = 0; + bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; + bar1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(barCekSplitPanel), new DevExpress.XtraBars.LinkPersistInfo(barCekEffVisible), new DevExpress.XtraBars.LinkPersistInfo(barCekPowerVisible), new DevExpress.XtraBars.LinkPersistInfo(barTxtPipeQ), new DevExpress.XtraBars.LinkPersistInfo(barTxtPipeHead), new DevExpress.XtraBars.LinkPersistInfo(barTxtStartHead), new DevExpress.XtraBars.LinkPersistInfo(barBtnSetEqPt), new DevExpress.XtraBars.LinkPersistInfo(barCekEqulEffVisible), new DevExpress.XtraBars.LinkPersistInfo(barCekEqVisible), new DevExpress.XtraBars.LinkPersistInfo(barBtnEqClear) }); + bar1.OptionsBar.AllowQuickCustomization = false; + bar1.OptionsBar.DrawBorder = false; + bar1.OptionsBar.MultiLine = true; + bar1.OptionsBar.UseWholeRow = true; + bar1.Text = "Tools"; + // + // barCekSplitPanel + // + barCekSplitPanel.BindableChecked = true; + barCekSplitPanel.Caption = "鍒嗗壊鏉�"; + barCekSplitPanel.CheckBoxVisibility = DevExpress.XtraBars.CheckBoxVisibility.BeforeText; + barCekSplitPanel.Checked = true; + barCekSplitPanel.Id = 1; + barCekSplitPanel.Name = "barCekSplitPanel"; + barCekSplitPanel.CheckedChanged += barCekSplitPanel_CheckedChanged; + // + // barCekEffVisible + // + barCekEffVisible.BindableChecked = true; + barCekEffVisible.Caption = "鏁堢巼绾�"; + barCekEffVisible.CheckBoxVisibility = DevExpress.XtraBars.CheckBoxVisibility.BeforeText; + barCekEffVisible.Checked = true; + barCekEffVisible.Id = 2; + barCekEffVisible.Name = "barCekEffVisible"; + barCekEffVisible.CheckedChanged += barCekEffVisible_CheckedChanged; + // + // barCekPowerVisible + // + barCekPowerVisible.BindableChecked = true; + barCekPowerVisible.Caption = "鍔熺巼绾�"; + barCekPowerVisible.CheckBoxVisibility = DevExpress.XtraBars.CheckBoxVisibility.BeforeText; + barCekPowerVisible.Checked = true; + barCekPowerVisible.Id = 3; + barCekPowerVisible.Name = "barCekPowerVisible"; + barCekPowerVisible.CheckedChanged += barCekPowerVisible_CheckedChanged; + // + // barTxtPipeQ + // + barTxtPipeQ.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right; + barTxtPipeQ.Caption = "娴侀噺:"; + barTxtPipeQ.Edit = repTxtPipeQ; + barTxtPipeQ.EditWidth = 80; + barTxtPipeQ.Id = 6; + barTxtPipeQ.Name = "barTxtPipeQ"; + barTxtPipeQ.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.Caption; + // + // repTxtPipeQ + // + repTxtPipeQ.AutoHeight = false; + repTxtPipeQ.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + repTxtPipeQ.Name = "repTxtPipeQ"; + // + // barTxtPipeHead + // + barTxtPipeHead.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right; + barTxtPipeHead.Caption = "鎵▼:"; + barTxtPipeHead.Edit = repTxtPipeHead; + barTxtPipeHead.EditWidth = 80; + barTxtPipeHead.Id = 7; + barTxtPipeHead.Name = "barTxtPipeHead"; + barTxtPipeHead.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.Caption; + // + // repTxtPipeHead + // + repTxtPipeHead.AutoHeight = false; + repTxtPipeHead.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + repTxtPipeHead.Name = "repTxtPipeHead"; + // + // barTxtStartHead + // + barTxtStartHead.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right; + barTxtStartHead.Caption = "鍑�鎵▼:"; + barTxtStartHead.Edit = repTxtStartHead; + barTxtStartHead.EditValue = "0"; + barTxtStartHead.EditWidth = 80; + barTxtStartHead.Id = 4; + barTxtStartHead.Name = "barTxtStartHead"; + barTxtStartHead.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.Caption; + // + // repTxtStartHead + // + repTxtStartHead.AutoHeight = false; + repTxtStartHead.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + repTxtStartHead.Name = "repTxtStartHead"; + // + // barBtnSetEqPt + // + barBtnSetEqPt.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right; + barBtnSetEqPt.Caption = "璁剧疆"; + barBtnSetEqPt.Id = 8; + barBtnSetEqPt.Name = "barBtnSetEqPt"; + barBtnSetEqPt.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph; + barBtnSetEqPt.ItemClick += barBtnSetEqPt_ItemClick; + // + // barCekEqulEffVisible + // + barCekEqulEffVisible.BindableChecked = true; + barCekEqulEffVisible.Caption = "绛夋晥绾�"; + barCekEqulEffVisible.CheckBoxVisibility = DevExpress.XtraBars.CheckBoxVisibility.BeforeText; + barCekEqulEffVisible.Checked = true; + barCekEqulEffVisible.Id = 11; + barCekEqulEffVisible.Name = "barCekEqulEffVisible"; + barCekEqulEffVisible.CheckedChanged += barCekEqulEffVisible_CheckedChanged; + // + // barCekEqVisible + // + barCekEqVisible.BindableChecked = true; + barCekEqVisible.Caption = "瑁呯疆绾�"; + barCekEqVisible.CheckBoxVisibility = DevExpress.XtraBars.CheckBoxVisibility.BeforeText; + barCekEqVisible.Checked = true; + barCekEqVisible.Id = 10; + barCekEqVisible.Name = "barCekEqVisible"; + barCekEqVisible.CheckedChanged += barCekEqVisible_CheckedChanged; + // + // barBtnEqClear + // + barBtnEqClear.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right; + barBtnEqClear.Caption = "娓呯┖"; + barBtnEqClear.Id = 12; + barBtnEqClear.Name = "barBtnEqClear"; + barBtnEqClear.ItemClick += barBtnEqClear_ItemClick; + // + // bar2 + // + bar2.BarName = "Custom 3"; + bar2.DockCol = 0; + bar2.DockRow = 1; + bar2.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; + bar2.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(barBtnAddVariableSpeedMenu), new DevExpress.XtraBars.LinkPersistInfo(barBtnAddEqualEffMenu) }); + bar2.OptionsBar.DrawBorder = false; + bar2.OptionsBar.MultiLine = true; + bar2.OptionsBar.UseWholeRow = true; + bar2.Text = "Custom 3"; + // + // barBtnAddVariableSpeedMenu + // + barBtnAddVariableSpeedMenu.Caption = "鍙橀�熸洸绾�"; + barBtnAddVariableSpeedMenu.Id = 17; + barBtnAddVariableSpeedMenu.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(barBtnAddVariableSpeedByN), new DevExpress.XtraBars.LinkPersistInfo(barBtnAddVariableSpeedByHz), new DevExpress.XtraBars.LinkPersistInfo(barBtnAddVariableSpeedByPoint) }); + barBtnAddVariableSpeedMenu.Name = "barBtnAddVariableSpeedMenu"; + // + // barBtnAddVariableSpeedByN + // + barBtnAddVariableSpeedByN.Caption = "娣诲姞(杞��)"; + barBtnAddVariableSpeedByN.Id = 18; + barBtnAddVariableSpeedByN.Name = "barBtnAddVariableSpeedByN"; + barBtnAddVariableSpeedByN.ItemClick += barBtnAddVariableSpeedByN_ItemClick; + // + // barBtnAddVariableSpeedByHz + // + barBtnAddVariableSpeedByHz.Caption = "娣诲姞(棰戠巼)"; + barBtnAddVariableSpeedByHz.Id = 19; + barBtnAddVariableSpeedByHz.Name = "barBtnAddVariableSpeedByHz"; + barBtnAddVariableSpeedByHz.ItemClick += barBtnAddVariableSpeedByHz_ItemClick; + // + // barBtnAddVariableSpeedByPoint + // + barBtnAddVariableSpeedByPoint.Caption = "娣诲姞(鐐�)"; + barBtnAddVariableSpeedByPoint.Id = 20; + barBtnAddVariableSpeedByPoint.Name = "barBtnAddVariableSpeedByPoint"; + barBtnAddVariableSpeedByPoint.ItemClick += barBtnAddVariableSpeedByPoint_ItemClick; + // + // barBtnAddEqualEffMenu + // + barBtnAddEqualEffMenu.Caption = "绛夋晥绾�"; + barBtnAddEqualEffMenu.Id = 23; + barBtnAddEqualEffMenu.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(barBtnAddEqualEffByEff) }); + barBtnAddEqualEffMenu.Name = "barBtnAddEqualEffMenu"; + // + // barBtnAddEqualEffByEff + // + barBtnAddEqualEffByEff.Caption = "娣诲姞(鏁堢巼)"; + barBtnAddEqualEffByEff.Id = 24; + barBtnAddEqualEffByEff.Name = "barBtnAddEqualEffByEff"; + barBtnAddEqualEffByEff.ItemClick += barBtnAddEqualEffByEff_ItemClick; // // barDockControlTop // @@ -68,7 +272,7 @@ barDockControlTop.Dock = DockStyle.Top; barDockControlTop.Location = new Point(0, 0); barDockControlTop.Manager = barManager1; - barDockControlTop.Size = new Size(1369, 33); + barDockControlTop.Size = new Size(1369, 67); // // barDockControlBottom // @@ -82,65 +286,23 @@ // barDockControlLeft.CausesValidation = false; barDockControlLeft.Dock = DockStyle.Left; - barDockControlLeft.Location = new Point(0, 33); + barDockControlLeft.Location = new Point(0, 67); barDockControlLeft.Manager = barManager1; - barDockControlLeft.Size = new Size(0, 891); + barDockControlLeft.Size = new Size(0, 857); // // barDockControlRight // barDockControlRight.CausesValidation = false; barDockControlRight.Dock = DockStyle.Right; - barDockControlRight.Location = new Point(1369, 33); + barDockControlRight.Location = new Point(1369, 67); barDockControlRight.Manager = barManager1; - barDockControlRight.Size = new Size(0, 891); - // - // bar1 - // - bar1.BarName = "Tools"; - bar1.DockCol = 0; - bar1.DockStyle = DevExpress.XtraBars.BarDockStyle.Top; - bar1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] { new DevExpress.XtraBars.LinkPersistInfo(barCekEffVisible), new DevExpress.XtraBars.LinkPersistInfo(barCekPowerVisible), new DevExpress.XtraBars.LinkPersistInfo(barCekSplitPanel) }); - bar1.OptionsBar.AllowQuickCustomization = false; - bar1.OptionsBar.DrawBorder = false; - bar1.OptionsBar.MultiLine = true; - bar1.OptionsBar.UseWholeRow = true; - bar1.Text = "Tools"; - // - // barButtonItem1 - // - barButtonItem1.Caption = "barButtonItem1"; - barButtonItem1.Id = 0; - barButtonItem1.Name = "barButtonItem1"; - // - // barCekSplitPanel - // - barCekSplitPanel.Caption = "鍒嗗壊鏉�"; - barCekSplitPanel.CheckBoxVisibility = DevExpress.XtraBars.CheckBoxVisibility.BeforeText; - barCekSplitPanel.Id = 1; - barCekSplitPanel.Name = "barCekSplitPanel"; - barCekSplitPanel.CheckedChanged += barCekSplitPanel_CheckedChanged; - // - // barCekEffVisible - // - barCekEffVisible.Caption = "鏁堢巼绾�"; - barCekEffVisible.CheckBoxVisibility = DevExpress.XtraBars.CheckBoxVisibility.BeforeText; - barCekEffVisible.Id = 2; - barCekEffVisible.Name = "barCekEffVisible"; - barCekEffVisible.CheckedChanged += barCekEffVisible_CheckedChanged; - // - // barCekPowerVisible - // - barCekPowerVisible.Caption = "鍔熺巼绾�"; - barCekPowerVisible.CheckBoxVisibility = DevExpress.XtraBars.CheckBoxVisibility.BeforeText; - barCekPowerVisible.Id = 3; - barCekPowerVisible.Name = "barCekPowerVisible"; - barCekPowerVisible.CheckedChanged += barCekPowerVisible_CheckedChanged; + barDockControlRight.Size = new Size(0, 857); // // PumpChartViewCtrl // AutoScaleDimensions = new SizeF(10F, 22F); AutoScaleMode = AutoScaleMode.Font; - Controls.Add(pumpChart1); + Controls.Add(pumpViewChart1); Controls.Add(barDockControlLeft); Controls.Add(barDockControlRight); Controls.Add(barDockControlBottom); @@ -148,22 +310,41 @@ Name = "PumpChartViewCtrl"; Size = new Size(1369, 924); ((System.ComponentModel.ISupportInitialize)barManager1).EndInit(); + ((System.ComponentModel.ISupportInitialize)repTxtPipeQ).EndInit(); + ((System.ComponentModel.ISupportInitialize)repTxtPipeHead).EndInit(); + ((System.ComponentModel.ISupportInitialize)repTxtStartHead).EndInit(); ResumeLayout(false); PerformLayout(); } #endregion - private Yw.WinFrmUI.Phart.PumpViewChart pumpChart1; + private Yw.WinFrmUI.Phart.PumpViewChart pumpViewChart1; private DevExpress.XtraBars.BarManager barManager1; private DevExpress.XtraBars.Bar bar1; private DevExpress.XtraBars.BarDockControl barDockControlTop; private DevExpress.XtraBars.BarDockControl barDockControlBottom; private DevExpress.XtraBars.BarDockControl barDockControlLeft; private DevExpress.XtraBars.BarDockControl barDockControlRight; - private DevExpress.XtraBars.BarButtonItem barButtonItem1; private DevExpress.XtraBars.BarCheckItem barCekSplitPanel; private DevExpress.XtraBars.BarCheckItem barCekEffVisible; private DevExpress.XtraBars.BarCheckItem barCekPowerVisible; + private DevExpress.XtraBars.BarEditItem barTxtStartHead; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repTxtStartHead; + private DevExpress.XtraBars.BarEditItem barTxtPipeQ; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repTxtPipeQ; + private DevExpress.XtraBars.BarEditItem barTxtPipeHead; + private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit repTxtPipeHead; + private DevExpress.XtraBars.BarButtonItem barBtnSetEqPt; + private DevExpress.XtraBars.BarCheckItem barCekEqVisible; + private DevExpress.XtraBars.BarCheckItem barCekEqulEffVisible; + private DevExpress.XtraBars.BarButtonItem barBtnEqClear; + private DevExpress.XtraBars.Bar bar2; + private DevExpress.XtraBars.BarSubItem barBtnAddVariableSpeedMenu; + private DevExpress.XtraBars.BarButtonItem barBtnAddVariableSpeedByN; + private DevExpress.XtraBars.BarButtonItem barBtnAddVariableSpeedByHz; + private DevExpress.XtraBars.BarButtonItem barBtnAddVariableSpeedByPoint; + private DevExpress.XtraBars.BarSubItem barBtnAddEqualEffMenu; + private DevExpress.XtraBars.BarButtonItem barBtnAddEqualEffByEff; } } diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.cs index fa4a6f1..c2def25 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/01-pump/01-view/PumpChartViewCtrl.cs @@ -1,19 +1,32 @@ -锘縩amespace HStation.WinFrmUI +锘縰sing DevExpress.Spreadsheet; +using HStation.WinFrmUI.PhartRelation; +using Yw.Geometry; +using Yw.Pump; +using Yw.WinFrmUI.Phart; + +namespace HStation.WinFrmUI { public partial class PumpChartViewCtrl : DevExpress.XtraEditors.XtraUserControl { public PumpChartViewCtrl() { InitializeComponent(); + this.barCekEqVisible.Checked = true; + this.barCekEqulEffVisible.Checked = true; + this.bar2.Visible = false; + this.barCekEqulEffVisible.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; } private Yw.Vmo.PhartDiagramExGraphListVmo _vmo = null; + private HStation.WinFrmUI.PumpCurveViewModel _model = null; private Yw.WinFrmUI.Phart.PumpCurveViewModel _vm = null; private bool _default_visible = true; - private bool _power_visible = false; - private bool _eff_visible = false; - private bool _split_panel = false; + private bool _power_visible = true; + private bool _eff_visible = true; + private bool _equal_eff_visible = true; + private bool _split_panel = true; + private double _nr; /// <summary> /// 鏁版嵁鍙樻洿浜嬩欢 @@ -26,6 +39,7 @@ public void SetBindingData(Yw.Vmo.PhartDiagramExGraphListVmo vmo, double nr) { _vmo = vmo; + _nr = nr; if (vmo == null) { ClearBindingData(); @@ -37,37 +51,360 @@ ClearBindingData(); return; } - var vm_def = vmo.GetDefaultPumpCurveViewMdoel(); - if (vm_def == null) + _model = vmo.GetDefaultPumpCurveViewMdoel(); + if (_model == null) return; - var vm_v_speed_list = vmo.GetVariableSpeedPumpCurveViewMdoelList(); - var vm_e_eff_list = vmo.GetCurveEqualEViewMdoelList(); + var vm_equal_eff_list = vmo.GetCurveEqualEViewMdoelList(); + var vm_variable_speed_eff_list = vmo.GetVariableSpeedPumpCurveViewMdoelList(); var vm = new Yw.WinFrmUI.Phart.PumpCurveViewModel(); vm.Id = ""; vm.ColorQH = Color.Blue; vm.ColorQE = Color.Green; vm.ColorQP = Color.Red; - vm.CurveQHName = "QH"; - vm.CurveQPName = "QP"; - vm.CurveQH = vm_def.CurveQH.FeatCurve.GetPointList(50); - vm.CurveQE = vm_def.CurveQE?.FeatCurve.GetPointList(50); - vm.CurveQP = vm_def.CurveQP?.FeatCurve.GetPointList(50); + vm.CurveQHName = $"{_nr}rpm({50}hz)"; + vm.CurveQPName = $"{_nr}rpm({50}hz)"; + vm.CurveQH = _model.CurveQH.FeatCurve.GetPointList(50); + vm.CurveQE = _model.CurveQE?.FeatCurve.GetPointList(50); + vm.CurveQP = _model.CurveQP?.FeatCurve.GetPointList(50); vm.PointListQH = vm.CurveQH; vm.PointListQE = vm.CurveQE; vm.PointListQP = vm.CurveQP; vm.Equip = null; - if (vm_e_eff_list == null || !vm_e_eff_list.Any()) + if (vm_equal_eff_list != null && vm_equal_eff_list.Any()) { - var curve_qe = vm_def.CurveQE.FeatCurve; - if (curve_qe != null && curve_qe.IsValid()) + vm.EqualEffList = new(); + foreach (var item in vm_equal_eff_list) { - var max_eff = curve_qe.GetPointList().Max(x => x.Y); - var eff_list = EqualParaCurveEListHelper.CalcEqualParaCurveE(vm_def, 50, 30, max_eff - 1); + var eff_vm = new Yw.WinFrmUI.Phart.PumpCurveEqualEffViewModel(); + eff_vm.Id = Guid.NewGuid().ToString(); + eff_vm.CurveName = $"{item.Eff:N1}"; + eff_vm.Color = Color.DarkGreen; + eff_vm.CurveEqualEff = item.DefinePoints; + eff_vm.Tension = item.Tension; + eff_vm.IsClosed = item.IsClosed; + vm.EqualEffList.Add(eff_vm); + } + } + + if (vm_variable_speed_eff_list != null && vm_variable_speed_eff_list.Any()) + { + vm.VariableSpeedList = new(); + var index = 0; + foreach (var item in vm_variable_speed_eff_list) + { + var vs_color = ColorHelper.GetDarkerColor(index); + var vs_vm = new Yw.WinFrmUI.Phart.PumpCurveVariableSpeedViewModel(); + vs_vm.Id = Guid.NewGuid().ToString(); + vs_vm.ColorQH = vs_color; + vs_vm.ColorQE = vs_color; + vs_vm.ColorQP = vs_color; + vs_vm.CurveQHName = $"{item.N}rpm({item.Hz}hz)"; + vs_vm.CurveQPName = $"{item.N}rpm({item.Hz}hz)"; + vs_vm.CurveQH = item.CurveQH.FeatCurve.GetPointList(30); + vs_vm.CurveQE = item.CurveQE.FeatCurve.GetPointList(30); + vs_vm.CurveQP = item.CurveQP.FeatCurve.GetPointList(30); + vs_vm.N = item.N; + vs_vm.Hz = item.Hz; + vm.VariableSpeedList.Add(vs_vm); + index++; + } + } + + vm.VariableSpeedList = new List<PumpCurveVariableSpeedViewModel>(); + vm.EqualEffList = new List<PumpCurveEqualEffViewModel>(); + vm.EqualPowerList = new(); + + SetBindingData(vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + } + + /// <summary> + /// 缁戝畾鏁版嵁 + /// </summary> + public void SetBindingData(Yw.WinFrmUI.Phart.PumpCurveViewModel vm, bool default_visible, bool split_panel, bool eff_visible, bool power_visible, bool equal_eff_visible) + { + _vm = vm; + if (vm == null) + { + ClearBindingData(); + return; + } + if (vm.VariableSpeedList != null && vm.VariableSpeedList.Any()) + { + vm.ColorQH = vm.ColorQE = vm.ColorQP = Color.Black; + } + this.pumpViewChart1.SetBindingData(vm, default_visible, split_panel, eff_visible, power_visible, equal_eff_visible); + } + + + /// <summary> + /// 娓呯┖缁戝畾鏁版嵁 + /// </summary> + public void ClearBindingData() + { + this.pumpViewChart1.ClearBindingData(); + } + + + private void SetEquip() + { + if (_vm == null) + return; + if (!_vm.IsValid()) + return; + if (this.barTxtStartHead.EditValue == null) + return; + if (this.barTxtPipeHead.EditValue == null) + return; + if (this.barTxtPipeQ.EditValue == null) + return; + + var start_head = Convert.ToDouble(this.barTxtStartHead.EditValue); + var pipe_head = Convert.ToDouble(this.barTxtPipeHead.EditValue); + var pipe_flow = Convert.ToDouble(this.barTxtPipeQ.EditValue); + + var equip_pt = new Yw.Geometry.Point2d(pipe_flow, pipe_head); + var qh_line = new Yw.Geometry.CubicSpline2d(_vm.CurveQH); + var equip_line = Yw.Geometry.EquipCurveHelper.CalcEquipCurve(qh_line, equip_pt, start_head, out Yw.Geometry.Point2d sect_pt); + if (equip_line == null || sect_pt == null) + { + XtraMessageBox.Show("璁$畻澶辫触,璁捐鐐逛笉鍚堢悊!"); + return; + } + + _vm.Equip = new Yw.WinFrmUI.Phart.PumpCurveEquipViewModel(); + _vm.Equip.Id = Guid.NewGuid().ToString(); + _vm.Equip.Color = Color.Black; + _vm.Equip.StartH = start_head; + _vm.Equip.PipeQ = pipe_flow; + _vm.Equip.PipeH = pipe_head; + + _vm.Equip.SectQ = sect_pt.X; + _vm.Equip.SectH = sect_pt.Y; + + if (_vm.CurveQP != null && _vm.CurveQP.Any()) + { + _vm.Equip.SectP = _vm.CurveQP.GetInterPointsY(sect_pt.X)?.FirstOrDefault(); + } + + if (_vm.CurveQE != null && _vm.CurveQE.Any()) + { + _vm.Equip.SectE = _vm.CurveQE.GetInterPointsY(sect_pt.X)?.FirstOrDefault(); + } + + _vm.Equip.CurveEquip = equip_line.GetPointList(); + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + } + + private void barCekEffVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _eff_visible = this.barCekEffVisible.Checked; + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + } + + private void barCekPowerVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _power_visible = this.barCekPowerVisible.Checked; + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + } + + private void barCekSplitPanel_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _split_panel = this.barCekSplitPanel.Checked; + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + } + + private void barCekEqVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (this.barCekEqVisible.Checked) + { + SetEquip(); + } + else + { + _vm.Equip = null; + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + } + } + + private void barCekEqulEffVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + _equal_eff_visible = this.barCekEqulEffVisible.Checked; + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + } + + private void barBtnEqClear_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + this.barTxtStartHead.EditValue = 0; + this.barTxtPipeQ.EditValue = null; + this.barTxtPipeHead.EditValue = null; + + _vm.Equip = null; + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + } + + private void barBtnSetEqPt_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + SetEquip(); + } + + private void barBtnAddVariableSpeedByN_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + AddByN(); + } + + private void barBtnAddVariableSpeedByHz_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + AddByHz(); + } + + private void barBtnAddVariableSpeedByPoint_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + AddByPoint(); + } + + private void barBtnAddEqualEffByEff_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + AddByEff(); + } + + private void AddByN() + { + if (_vm == null) + return; + var dlg = new SetValueDlg(); + dlg.SetBindingData(_nr); + dlg.VerifyValueChanged += (speed) => + { + var hz = Math.Round(speed / _nr * 50, 1); + if (hz > 50 || hz < 10) + { + return false; + } + + var index = _vm.VariableSpeedList?.Count + 1 ?? 1; + var vs_color = ColorHelper.GetDarkerColor(index); + var vs_vm = new Yw.WinFrmUI.Phart.PumpCurveVariableSpeedViewModel(); + vs_vm.Id = Guid.NewGuid().ToString(); + vs_vm.ColorQH = vs_color; + vs_vm.ColorQE = vs_color; + vs_vm.ColorQP = vs_color; + vs_vm.CurveQHName = $"{speed}rpm({hz}hz)"; + vs_vm.CurveQPName = $"{speed}rpm({hz}hz)"; + vs_vm.CurveQH = _vm.CurveQH.GetQHPointListByN(50, hz); + vs_vm.CurveQE = _vm.CurveQE.GetQEPointListByN(50, hz); + vs_vm.CurveQP = _vm.CurveQP.GetQEPointListByN(50, hz); + vs_vm.N = speed; + vs_vm.Hz = hz; + _vm.VariableSpeedList.Add(vs_vm); + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + + //this.DataChangedEvent?.Invoke(); + return true; + }; + dlg.ShowDialog(); + } + + private void AddByHz() + { + if (_vm == null) + return; + var dlg = new SetValueDlg(); + dlg.VerifyValueChanged += (hz) => + { + if (hz > 50 || hz < 10) + { + return false; + } + var speed = Math.Round(hz / 50 * _nr); + var index = _vm.VariableSpeedList?.Count + 1 ?? 1; + var vs_color = ColorHelper.GetDarkerColor(index); + var vs_vm = new Yw.WinFrmUI.Phart.PumpCurveVariableSpeedViewModel(); + vs_vm.Id = Guid.NewGuid().ToString(); + vs_vm.ColorQH = vs_color; + vs_vm.ColorQE = vs_color; + vs_vm.ColorQP = vs_color; + vs_vm.CurveQHName = $"{speed}rpm({hz}hz)"; + vs_vm.CurveQPName = $"{speed}rpm({hz}hz)"; + vs_vm.CurveQH = _vm.CurveQH.GetQHPointListByN(50, hz); + vs_vm.CurveQE = _vm.CurveQE.GetQEPointListByN(50, hz); + vs_vm.CurveQP = _vm.CurveQP.GetQEPointListByN(50, hz); + vs_vm.N = speed; + vs_vm.Hz = hz; + _vm.VariableSpeedList.Add(vs_vm); + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + + return true; + }; + dlg.ShowDialog(); + } + + private void AddByPoint() + { + if (_vm == null) + return; + if (!_vm.IsValid()) + return; + var dlg = new SetPointDlg(); + dlg.SetBindingData(); + dlg.VerifyValueChanged += (x, y) => + { + var pt = new Yw.Geometry.Point2d(x, y); + var speed = PumpCalcHelper.GetSimuValue(new CubicSpline2d(_vm.CurveQH), pt, _nr); + var hz = Math.Round(speed / _nr * 50, 1); + if (hz > 50 || hz < 20) + { + return false; + } + speed = Math.Round(speed, 1); + var index = _vm.VariableSpeedList?.Count + 1 ?? 1; + var vs_color = ColorHelper.GetDarkerColor(index); + var vs_vm = new Yw.WinFrmUI.Phart.PumpCurveVariableSpeedViewModel(); + vs_vm.Id = Guid.NewGuid().ToString(); + vs_vm.ColorQH = vs_color; + vs_vm.ColorQE = vs_color; + vs_vm.ColorQP = vs_color; + vs_vm.CurveQHName = $"{speed}rpm({hz}hz)"; + vs_vm.CurveQPName = $"{speed}rpm({hz}hz)"; + vs_vm.CurveQH = _vm.CurveQH.GetQHPointListByN(50, hz); + vs_vm.CurveQE = _vm.CurveQE.GetQEPointListByN(50, hz); + vs_vm.CurveQP = _vm.CurveQP.GetQEPointListByN(50, hz); + vs_vm.N = speed; + vs_vm.Hz = hz; + _vm.VariableSpeedList.Add(vs_vm); + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); + + return true; + }; + dlg.ShowDialog(); + } + + private void AddByEff() + { + if (_vm == null) + return; + if (!_vm.IsValid()) + return; + if (_vm.CurveQE == null || !_vm.CurveQE.Any()) + return; + var dlg = new SetEffDlg(); + dlg.SetBindingData(); + dlg.VerifyValueChanged += (eff_double_list) => + { + double max_hz = 50; + double min_hz = 30; + if (_vm.VariableSpeedList != null && _vm.VariableSpeedList.Any()) + { + max_hz = Math.Max(max_hz, _vm.VariableSpeedList.Max(x => x.Hz)); + min_hz = Math.Min(min_hz, _vm.VariableSpeedList.Min(x => x.Hz)); + } + + foreach (var eff in eff_double_list) + { + var eff_list = EqualParaCurveEListHelper.CalcEqualParaCurveE(_model, max_hz, min_hz, eff); if (eff_list != null && eff_list.Any()) { - vm.EqualEffList = new List<Yw.WinFrmUI.Phart.PumpCurveEqualEffViewModel>(); foreach (var item in eff_list) { var def_pt_list = item.DefinePoints; @@ -78,100 +415,17 @@ eff_vm.CurveEqualEff = item.DefinePoints; eff_vm.Tension = item.Tension; eff_vm.IsClosed = item.IsClosed; - vm.EqualEffList.Add(eff_vm); + _vm.EqualEffList.Add(eff_vm); } } } - } + SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible, _equal_eff_visible); - //vm.VariableSpeedList = new List<Yw.WinFrmUI.Phart.PumpChartVariableSpeedViewModel>(); - //vm.EqualPowerList = new List<Yw.WinFrmUI.Phart.PumpChartEqualPowerViewModel>(); - //for (int eff = 30; eff < 90; eff += 1) - //{ - // var ve = new Yw.WinFrmUI.Phart.PumpChartEqualEffViewModel(); - // //ve.Id = rhs.Id; - // ve.CurveName = $"{eff}"; - // ve.Color = Color.ForestGreen; - // ve.CurveEqualEff = new List<Yw.Geometry.Point2d>(); - // for (int hz = 30; hz <= 50; hz += 5) - // { - // var qe = vm_defult.CurveQE.ToNewByN(50, hz); - // var q_array = qe.FeatCurve.GetPointsX(eff); - // if (q_array == null || !q_array.Any()) - // { - // continue; - // } - // var qh = vm_defult.CurveQH.ToNewByN(50, hz); - // var flow = q_array.FirstOrDefault(); - // var head = qh.FeatCurve.GetPointY(flow); - // ve.CurveEqualEff.Add(new Yw.Geometry.Point2d(flow, head)); - // } - // if (!ve.CurveEqualEff.Any()) - // { - // continue; - // } + return true; + }; + dlg.ShowDialog(); - // vm.EqualEffList.Add(ve); - //} - - //for (int hz = 30; hz < 50; hz += 5) - //{ - // var tN = nr * hz / 50; - // var vs = new Yw.WinFrmUI.Phart.PumpChartVariableSpeedViewModel(); - // vs.CurveQHName = $"{tN}"; - // vs.CurveQPName = $"{tN}"; - // vs.CurveQH = vm_defult.CurveQH.GetPointListByN(nr, tN, 50); - // vs.CurveQE = vm_defult.CurveQE.GetPointListByN(nr, tN, 50); - // vs.CurveQP = vm_defult.CurveQP.GetPointListByN(nr, tN, 50); - // vs.Hz = hz; - // vs.N = tN; - // vm.VariableSpeedList.Add(vs); - //} - - SetBindingData(vm, _default_visible, _split_panel, _eff_visible, _power_visible); - } - - - /// <summary> - /// 缁戝畾鏁版嵁 - /// </summary> - public void SetBindingData(Yw.WinFrmUI.Phart.PumpCurveViewModel vm, bool default_visible = true, bool split_panel = false, bool eff_visible = false, bool power_visible = true) - { - _vm = vm; - if (vm == null) - { - ClearBindingData(); - return; - } - this.pumpChart1.SetBindingData(vm, default_visible, split_panel, eff_visible, power_visible); - } - - - /// <summary> - /// 娓呯┖缁戝畾鏁版嵁 - /// </summary> - public void ClearBindingData() - { - this.pumpChart1.ClearBindingData(); - } - - private void barCekEffVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - _eff_visible = this.barCekEffVisible.Checked; - SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible); - } - - private void barCekPowerVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - _power_visible = this.barCekPowerVisible.Checked; - SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible); - } - - private void barCekSplitPanel_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - _split_panel = this.barCekSplitPanel.Checked; - SetBindingData(_vm, _default_visible, _split_panel, _eff_visible, _power_visible); } /// <summary> @@ -182,6 +436,6 @@ return new Yw.Vmo.PhartDiagramExGraphListVmo(); } - + } } diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/03-variable-speed/PumpVariableSpeedCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/03-variable-speed/PumpVariableSpeedCtrl.Designer.cs deleted file mode 100644 index 21d4979..0000000 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/03-variable-speed/PumpVariableSpeedCtrl.Designer.cs +++ /dev/null @@ -1,58 +0,0 @@ -锘縩amespace HStation.WinFrmUI.PhartRelation -{ - partial class PumpVariableSpeedCtrl - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - pumpSerialParallelChart1 = new Yw.WinFrmUI.Phart.PumpSerialParallelChart(); - SuspendLayout(); - // - // pumpSerialParallelChart1 - // - pumpSerialParallelChart1.Dock = DockStyle.Fill; - pumpSerialParallelChart1.LineNameVisible = true; - pumpSerialParallelChart1.LineVisible = false; - pumpSerialParallelChart1.Location = new Point(0, 0); - pumpSerialParallelChart1.Name = "pumpSerialParallelChart1"; - pumpSerialParallelChart1.Size = new Size(1164, 975); - pumpSerialParallelChart1.TabIndex = 0; - // - // PumpVariableSpeedCtrl - // - AutoScaleDimensions = new SizeF(10F, 22F); - AutoScaleMode = AutoScaleMode.Font; - Controls.Add(pumpSerialParallelChart1); - Name = "PumpVariableSpeedCtrl"; - Size = new Size(1164, 975); - ResumeLayout(false); - } - - #endregion - - private Yw.WinFrmUI.Phart.PumpSerialParallelChart pumpSerialParallelChart1; - } -} diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/03-variable-speed/PumpVariableSpeedCtrl.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/03-variable-speed/PumpVariableSpeedCtrl.cs deleted file mode 100644 index 23a9775..0000000 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/03-variable-speed/PumpVariableSpeedCtrl.cs +++ /dev/null @@ -1,23 +0,0 @@ -锘縰sing DevExpress.XtraEditors; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace HStation.WinFrmUI.PhartRelation -{ - public partial class PumpVariableSpeedCtrl : DevExpress.XtraEditors.XtraUserControl - { - public PumpVariableSpeedCtrl() - { - InitializeComponent(); - } - - - } -} diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/01-helper/ColorHelper.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/01-helper/ColorHelper.cs index 4576d50..8cf26cc 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/01-helper/ColorHelper.cs +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/01-helper/ColorHelper.cs @@ -1,4 +1,7 @@ -锘縩amespace HStation.WinFrmUI.PhartRelation +锘縰sing NPOI.SS.Formula.Functions; +using System.Diagnostics.Metrics; + +namespace HStation.WinFrmUI.PhartRelation { public class ColorHelper { @@ -35,6 +38,25 @@ } + + + private static List<Color> _color_array = new List<Color>() + { + Color.Red, Color.Blue, Color.Green,Color.DodgerBlue, + Color.Fuchsia, Color.MidnightBlue, Color.Maroon, Color.Aquamarine, + Color.Bisque,Color.BurlyWood + }; + + + public static System.Drawing.Color GetDarkerColor(int index) + { + if (index < _color_array.Count) + { + return _color_array[index]; + } + return GetDarkerColor(); + } + //鑾峰彇鍔犳繁棰滆壊 public static Color GetDarkerColor(Color color) { @@ -49,7 +71,8 @@ return Color.FromArgb(r, g, b); } - + + } } \ No newline at end of file diff --git "a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation - Backup \0501\051.WinFrmUI.PhartRelation.Core.csproj" "b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation - Backup \0501\051.WinFrmUI.PhartRelation.Core.csproj" deleted file mode 100644 index 7777f48..0000000 --- "a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation - Backup \0501\051.WinFrmUI.PhartRelation.Core.csproj" +++ /dev/null @@ -1,70 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <TargetFramework>net6.0-windows</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <Nullable>disable</Nullable> - </PropertyGroup> - - <ItemGroup> - <Compile Remove="00-helper\**" /> - <EmbeddedResource Remove="00-helper\**" /> - <None Remove="00-helper\**" /> - <Page Remove="00-helper\**" /> - </ItemGroup> - - <ItemGroup> - <Compile Include="00-helper\PhartPerformCurveHelper.cs" /> - </ItemGroup> - - <ItemGroup> - <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> - <PackageReference Include="NPOI" Version="2.7.1" /> - <PackageReference Include="Yw.BLL.Phart.Core" Version="3.0.2" /> - </ItemGroup> - - <ItemGroup> - <ProjectReference Include="..\..\BLL\HStation.BLL.Assets.Core\HStation.BLL.Assets.Core.csproj" /> - <ProjectReference Include="..\..\BLL\HStation.BLL.PhartRelation.Core\HStation.BLL.PhartRelation.Core.csproj" /> - <ProjectReference Include="..\HStation.WinFrmUI.Core\HStation.WinFrmUI.Core.csproj" /> - <ProjectReference Include="..\Yw.WinFrmUI.Phart.Core\Yw.WinFrmUI.Phart.Core.csproj" /> - </ItemGroup> - - <ItemGroup> - <Compile Update="01-pump-main\SetOtherNameDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="01-pump-main\SetImportanceDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="01-pump-main\XhsAssetsPumpMainPhartPanel.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Update="02-valve-main\XhsAssetsValveMainPhartListCtrl.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Update="99-common\SelXhsAssetsValveMainPhartDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="99-common\PumpPerform2dMultiViewDlg.cs" /> - <Compile Update="99-common\PumpPerform2dViewDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="Properties\Resources.Designer.cs"> - <DesignTime>True</DesignTime> - <AutoGen>True</AutoGen> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - <Compile Update="XhsProjectUserControl.cs"> - <SubType>UserControl</SubType> - </Compile> - </ItemGroup> - - <ItemGroup> - <EmbeddedResource Update="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - </EmbeddedResource> - </ItemGroup> - -</Project> diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation - Backup.WinFrmUI.PhartRelation.Core.csproj b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation - Backup.WinFrmUI.PhartRelation.Core.csproj deleted file mode 100644 index 8824b2c..0000000 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation - Backup.WinFrmUI.PhartRelation.Core.csproj +++ /dev/null @@ -1,70 +0,0 @@ -<Project Sdk="Microsoft.NET.Sdk"> - - <PropertyGroup> - <TargetFramework>net6.0-windows</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <Nullable>disable</Nullable> - </PropertyGroup> - - <ItemGroup> - <Compile Remove="00-helper\**" /> - <EmbeddedResource Remove="00-helper\**" /> - <None Remove="00-helper\**" /> - <Page Remove="00-helper\**" /> - </ItemGroup> - - <ItemGroup> - <Compile Include="00-helper\PhartPerformCurveHelper.cs" /> - </ItemGroup> - - <ItemGroup> - <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> - <PackageReference Include="NPOI" Version="2.7.1" /> - <PackageReference Include="Yw.BLL.Phart.Core" Version="3.0.2" /> - </ItemGroup> - - <ItemGroup> - <ProjectReference Include="..\..\BLL\HStation.BLL.Assets.Core\HStation.BLL.Assets.Core.csproj" /> - <ProjectReference Include="..\..\BLL\HStation.BLL.PhartRelation.Core\HStation.BLL.PhartRelation.Core.csproj" /> - <ProjectReference Include="..\HStation.WinFrmUI.Core\HStation.WinFrmUI.Core.csproj" /> - <ProjectReference Include="..\Yw.WinFrmUI.Phart.Core\Yw.WinFrmUI.Phart.Core.csproj" /> - </ItemGroup> - - <ItemGroup> - <Compile Update="01-pump-main\SetOtherNameDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="01-pump-main\SetImportanceDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="01-pump-main\XhsAssetsPumpMainPhartPanel.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Update="02-valve-main\XhsValveMainPhartListCtrl.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Update="99-common\SelXhsValveMainPhartDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="99-common\PumpPerform2dMultiViewDlg.cs" /> - <Compile Update="99-common\PumpPerform2dViewDlg.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Update="Properties\Resources.Designer.cs"> - <DesignTime>True</DesignTime> - <AutoGen>True</AutoGen> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - <Compile Update="XhsProjectUserControl.cs"> - <SubType>UserControl</SubType> - </Compile> - </ItemGroup> - - <ItemGroup> - <EmbeddedResource Update="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - </EmbeddedResource> - </ItemGroup> - -</Project> diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation.WinFrmUI.PhartRelation.Core.csproj.user b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation.WinFrmUI.PhartRelation.Core.csproj.user index eb7cfa4..7dcfdd9 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation.WinFrmUI.PhartRelation.Core.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/HStation.WinFrmUI.PhartRelation.Core.csproj.user @@ -23,9 +23,6 @@ <Compile Update="02-valve-main\XhsValveMainPhartPanel.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Update="03-variable-speed\PumpVariableSpeedCtrl.cs"> - <SubType>UserControl</SubType> - </Compile> <Compile Update="relation\02-edit\EditPhartDiagramRelationDlg.cs"> <SubType>Form</SubType> </Compile> diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Properties/Resources.resx b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Properties/Resources.resx index 1af7de1..887556f 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Properties/Resources.resx +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Properties/Resources.resx @@ -117,4 +117,8 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="pointer" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\pointer.svg;DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2, Version=23.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> + </data> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Resources/pointer.svg b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Resources/pointer.svg new file mode 100644 index 0000000..7d1fd9a --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/Resources/pointer.svg @@ -0,0 +1,16 @@ +锘�<?xml version='1.0' encoding='UTF-8'?> +<svg x="0px" y="0px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" style="enable-background:new 0 0 32 32"> + <style type="text/css"> + .Black{fill:#737374;} + .Yellow{fill:#FCB01B;} + .Green{fill:#129C49;} + .Blue{fill:#387CB7;} + .Red{fill:#D02127;} + .White{fill:#FFFFFF;} + .st0{opacity:0.5;} + .st1{opacity:0.75;} + .st2{opacity:0.25;} + .st3{display:none;fill:#737374;} +</style> + <path d="M18.2,20H26L10,4v22l5.3-5.3l2.7,6.7c0.2,0.5,0.8,0.8,1.3,0.5l0.9-0.4c0.5-0.2,0.8-0.8,0.5-1.3L18.2,20z" class="Black" /> +</svg> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/03-grid/PhartDiagramRelationGridViewCtrl.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/03-grid/PhartDiagramRelationGridViewCtrl.cs index 0dffae4..cc1874e 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/03-grid/PhartDiagramRelationGridViewCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/relation/03-grid/PhartDiagramRelationGridViewCtrl.cs @@ -27,28 +27,38 @@ private string _objectType; - public Action<List<PhartDiagramRelationExtensionsVmo>> SelectDataEvent; + public Action<PhartDiagramRelationExtensionsVmo> SelectDataEvent; /// <summary> /// 缁戝畾鏁版嵁 /// </summary> - public async void SetBindingData(string objectType, long objectId) + public async void SetBindingData(string objectType, long objectId, long? curveId) { _objectType = objectType; var allList = await BLLFactory<HStation.BLL.PhartDiagramRelation>.Instance.GetByObjectTypeAndObjectID(objectType, objectId); - SetBindingData(allList); + SetBindingData(allList, curveId); gridView1_FocusedRowChanged(null, null); } /// <summary> /// 缁戝畾鏁版嵁 /// </summary> - public void SetBindingData(List<PhartDiagramRelationVmo> allList) + public void SetBindingData(List<PhartDiagramRelationVmo> allList, long? curveId) { _allBindingList = new List<PhartDiagramRelationGridItemViewModel>(); allList?.OrderBy(x => x.SortCode).ToList().ForEach(x => _allBindingList.Add(new PhartDiagramRelationGridItemViewModel(x))); this.phartDiagramRelationGridItemViewModelBindingSource.DataSource = _allBindingList; this.phartDiagramRelationGridItemViewModelBindingSource.ResetBindings(false); + if (curveId != null) + { + for (int i = 0; i < _allBindingList.Count; i++) + { + if (_allBindingList[i].ID == curveId) + { + gridView1.FocusedRowHandle = i; + } + } + } } //琛岀偣鍑讳簨浠� @@ -74,7 +84,11 @@ if (vm == null) return; var list = await new BLL.PhartDiagramRelation().GetExByObjectTypeAndObjectID(_objectType, vm.Vmo.ObjectID); - SelectDataEvent.Invoke(list); + var targetItem = list.FirstOrDefault(x => x.ID == vm.ID); + if (targetItem != null) + { + SelectDataEvent.Invoke(targetItem); + } } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs index d35beb8..6a6dcb2 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs +++ b/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 + + } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/05-function/SimulationFunctionCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/05-function/SimulationFunctionCtrl.cs index dc49fe8..7c3dc8a 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/05-function/SimulationFunctionCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/05-function/SimulationFunctionCtrl.cs @@ -279,7 +279,8 @@ } } - var overlay = this.ShowOverlay(); + WaitFormHelper.ShowWaitForm(this.FindForm(), "姝e湪鍔犺浇妯″瀷鏁版嵁锛岃绋嶅悗..."); + //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; } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs index 13a2104..b6a8882 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs @@ -1,4 +1,5 @@ 锘縰sing 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(), "姝e湪鍔犺浇妯″瀷锛岃绋嶅悗..."); 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()); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingCtrl.cs index ca8ad48..c61b8a6 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingCtrl.cs @@ -33,6 +33,8 @@ private AssetsValveSingleMatchingViewModel _row; private ValveMatchingViewModel _viewModel; + private long _curveDbId; + public class ValveMatchingViewModel { public ValveMatchingViewModel() @@ -49,7 +51,7 @@ /// <summary> /// 缁戝畾鏁版嵁 /// </summary> - public async void SetBindingData(string dbId) + public async void SetBindingData(string dbId, string curveDbId) { var allList = await BLLFactory<HStation.BLL.AssetsValveMain>.Instance.GetAll(); _allList = new List<AssetsValveSingleMatchingViewModel>(); @@ -58,6 +60,10 @@ { var item = allList?.Find(x => x.ID == id); _selected = item; + } + if (long.TryParse(curveDbId, out long curveId)) + { + _curveDbId = curveId; } Search(); await Task.Delay(300); @@ -139,15 +145,14 @@ } _row = row; _viewModel.Vmo = row.Vmo; - this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.ValveMain, row.Vmo.ID); + this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.ValveMain, row.Vmo.ID, _curveDbId); } //鏇茬嚎鏁版嵁鍏宠仈鍙樺寲 - private void SelectData(List<PhartDiagramRelationExtensionsVmo> list) + private void SelectData(PhartDiagramRelationExtensionsVmo def) { - if (list != null && list.Count > 0) + if (def != null) { - var def = list.OrderByDescending(x => x.Importance).First(); _viewModel.MatchingCurveDbId = def.ID.ToString(); var curve = def.Diagram.GraphList[0].GetFeatPointList(); if (_row.ValveType == HStation.Assets.eValveType.GPV) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingDlg.cs index 79d8879..ad8cf1f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/03-valve/AssetsValveSingleMatchingDlg.cs @@ -35,7 +35,7 @@ return; } _input = input; - this.assetsValveSingleMatchingCtrl2.SetBindingData(input.DbId); + this.assetsValveSingleMatchingCtrl2.SetBindingData(input.DbId, input.CurveDbId); } private void GeneralOkAndCancelCtrl1_OkEvent() diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingCtrl.cs index 970e27c..6388691 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingCtrl.cs @@ -33,6 +33,8 @@ private AssetsTankSingleMatchingViewModel _row; private TankMatchingViewModel _viewModel; + private long _curveDbid; + public class TankMatchingViewModel { public TankMatchingViewModel() @@ -48,7 +50,7 @@ /// <summary> /// 缁戝畾鏁版嵁 /// </summary> - public async void SetBindingData(string dbId) + public async void SetBindingData(string dbId, string curveDbId) { var allList = await BLLFactory<HStation.BLL.AssetsTankMain>.Instance.GetAll(); _allList = new List<AssetsTankSingleMatchingViewModel>(); @@ -57,6 +59,10 @@ { var item = allList?.Find(x => x.ID == id); _selected = item; + } + if (long.TryParse(curveDbId, out long curveId)) + { + _curveDbid = curveId; } Search(); await Task.Delay(300); @@ -122,15 +128,14 @@ } _row = row; _viewModel.Vmo = row.Vmo; - this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.TankMain, row.Vmo.ID); + this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.TankMain, row.Vmo.ID, _curveDbid); } //鏇茬嚎鏁版嵁鍏宠仈鍙樺寲 - private void SelectData(List<PhartDiagramRelationExtensionsVmo> list) + private void SelectData(PhartDiagramRelationExtensionsVmo def) { - if (list != null && list.Count > 0) + if (def != null) { - var def = list.OrderByDescending(x => x.Importance).First(); _viewModel.MatchingCurveDbId = def.ID.ToString(); var curve = def.Diagram.GraphList[0].GetFeatPointList(); _viewModel.MatchingCurve = new List<HydroCurvePointViewModel>(); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingDlg.cs index 70edbc5..75c029b 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/09-Tank/AssetsTankSingleMatchingDlg.cs @@ -23,7 +23,7 @@ return; } _input = input; - this.assetsTankSingleMatchingCtrl1.SetBindingData(input.DbId); + this.assetsTankSingleMatchingCtrl1.SetBindingData(input.DbId, input.CurveDbId); } private void GeneralOkAndCancelCtrl1_OkEvent() diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingCtrl.cs index 9b6bf3c..bbd47e3 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingCtrl.cs @@ -33,6 +33,8 @@ private AssetsCompressorSingleMatchingViewModel _row; private CompressorMatchingViewModel _viewModel; + private long _curveDbId; + public class CompressorMatchingViewModel { public CompressorMatchingViewModel() @@ -47,7 +49,7 @@ /// <summary> /// 缁戝畾鏁版嵁 /// </summary> - public async void SetBindingData(string dbId) + public async void SetBindingData(string dbId, string curveDbId) { var allList = await BLLFactory<HStation.BLL.AssetsCompressorMain>.Instance.GetAll(); _allList = new List<AssetsCompressorSingleMatchingViewModel>(); @@ -56,6 +58,10 @@ { var item = allList?.Find(x => x.ID == id); _selected = item; + } + if (long.TryParse(curveDbId, out long curveid)) + { + _curveDbId = curveid; } Search(); await Task.Delay(300); @@ -137,15 +143,14 @@ } _row = row; _viewModel.Vmo = row.Vmo; - this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.CompressorMain, row.Vmo.ID); + this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.CompressorMain, row.Vmo.ID, _curveDbId); } //鏇茬嚎鏁版嵁鍏宠仈鍙樺寲 - private void SelectData(List<PhartDiagramRelationExtensionsVmo> list) + private void SelectData(PhartDiagramRelationExtensionsVmo def) { - if (list != null && list.Count > 0) + if (def != null) { - var def = list.OrderByDescending(x => x.Importance).First(); _viewModel.MatchingCurveDbId = def.ID.ToString(); var curve = def.Diagram.GraphList[0].GetFeatPointList(); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingDlg.cs index 7daeb8a..a597429 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/17-compressor/AssetsCompressorSingleMatchingDlg.cs @@ -35,7 +35,7 @@ return; } _input = input; - this.assetsCompressorSingleMatchingCtrl1.SetBindingData(input.DbId); + this.assetsCompressorSingleMatchingCtrl1.SetBindingData(input.DbId, input.CurveDbId); } private void GeneralOkAndCancelCtrl1_OkEvent() diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingCtrl.cs index 35c7e20..3e2c54f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingCtrl.cs @@ -33,6 +33,8 @@ private AssetsExchangerSingleMatchingViewModel _row; private ExchangerMatchingViewModel _viewModel; + private long _curveDbId; + public class ExchangerMatchingViewModel { public ExchangerMatchingViewModel() @@ -47,7 +49,7 @@ /// <summary> /// 缁戝畾鏁版嵁 /// </summary> - public async void SetBindingData(string dbId) + public async void SetBindingData(string dbId, string curveDbId) { var allList = await BLLFactory<HStation.BLL.AssetsExchangerMain>.Instance.GetAll(); _allList = new List<AssetsExchangerSingleMatchingViewModel>(); @@ -56,6 +58,10 @@ { var item = allList?.Find(x => x.ID == id); _selected = item; + } + if (long.TryParse(curveDbId, out long curveId)) + { + _curveDbId = curveId; } Search(); await Task.Delay(300); @@ -137,15 +143,14 @@ } _row = row; _viewModel.Vmo = row.Vmo; - this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.ExchangerMain, row.Vmo.ID); + this.phartDiagramRelationGridViewCtrl1.SetBindingData(HStation.Assets.DataType.ExchangerMain, row.Vmo.ID, _curveDbId); } //鏇茬嚎鏁版嵁鍏宠仈鍙樺寲 - private void SelectData(List<PhartDiagramRelationExtensionsVmo> list) + private void SelectData(PhartDiagramRelationExtensionsVmo def) { - if (list != null && list.Count > 0) + if (def != null) { - var def = list.OrderByDescending(x => x.Importance).First(); _viewModel.MatchingCurveDbId = def.ID.ToString(); var curve = def.Diagram.GraphList[0].GetFeatPointList(); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingDlg.cs index faf6c0a..4f73ddf 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/07-matching/18-exchanger/AssetsExchangerSingleMatchingDlg.cs @@ -35,7 +35,7 @@ return; } _input = input; - this.assetsExchangerSingleMatchingCtrl1.SetBindingData(input.DbId); + this.assetsExchangerSingleMatchingCtrl1.SetBindingData(input.DbId, input.CurveDbId); } private void GeneralOkAndCancelCtrl1_OkEvent() diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatCtrl.cs index 5040227..03b7389 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatCtrl.cs +++ b/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> diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatDlg.cs index 4fac94e..80608b7 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatDlg.cs +++ b/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) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.Designer.cs index d317500..d76d34d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.Designer.cs +++ b/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(); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs index 3bea060..edbe720 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs +++ b/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); + } + } } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/04-working/SimulationPumpSingleWorkingChartCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/04-working/SimulationPumpSingleWorkingChartCtrl.cs index 5004c5e..ffce298 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/04-working/SimulationPumpSingleWorkingChartCtrl.cs +++ b/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) { diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroModelInfoExtensions.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroModelInfoExtensions.cs index c34e000..284709d 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroModelInfoExtensions.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroModelInfoExtensions.cs @@ -1,4 +1,5 @@ -锘縰sing Yw.EPAnet; +锘縰sing 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,10 +175,237 @@ } } + //闃讳欢 + 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 + } } diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroParterInfoExtensions.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroParterInfoExtensions.cs new file mode 100644 index 0000000..10ff505 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroParterInfoExtensions.cs @@ -0,0 +1,56 @@ +锘縰sing 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)); + } + + + } +} diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.Designer.cs index b5a26ee..eac1f42 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.Designer.cs +++ b/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; diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.cs index 677cd48..af75974 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.cs +++ b/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; diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.Designer.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.Designer.cs index a5175fd..bfc6a00 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.Designer.cs +++ b/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; } } diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.cs index a92c110..2b25518 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.cs +++ b/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; diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/05-analy/HydroWorkingMonitorAnalyListCtrl.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/05-analy/HydroWorkingMonitorAnalyListCtrl.cs index 9d74470..d5879d7 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/05-analy/HydroWorkingMonitorAnalyListCtrl.cs +++ b/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(); } diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.cs index e9eeda7..c76a084 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.cs @@ -10,7 +10,7 @@ { public HydroSingleWorkingLossCurveCtrl() { - InitializeComponent(); + InitializeComponent(); } /// <summary> @@ -219,19 +219,19 @@ e.CrosshairLineElement.Color = Color.Green; e.CrosshairLineElement.LineStyle.DashStyle = DashStyle.DashDot; e.CrosshairLineElement.LineStyle.Thickness = 3; - + // Specify the back color for the crosshair argument axis label. foreach (CrosshairAxisLabelElement axisLabelElement in e.CrosshairAxisLabelElements) { axisLabelElement.BackColor = Color.Blue; axisLabelElement.Text = $"{axisLabelElement.AxisValue:N2}"; - + } - + foreach (CrosshairElementGroup group in e.CrosshairElementGroups) - { - CrosshairGroupHeaderElement groupHeaderElement = group.HeaderElement; + { + CrosshairGroupHeaderElement groupHeaderElement = group.HeaderElement; var pt = group.HeaderElement.SeriesPoints.FirstOrDefault(); if (pt != null) { @@ -240,12 +240,12 @@ { groupHeaderElement.Text = model.Name; } - } + } // Specify the text, text color and font for the crosshair group header element. 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) { @@ -253,7 +253,7 @@ ele.AxisLabelElement.DXFont = new DXFont(this.Font.Name, 6); //ele.AxisLabelElement.Visible = false; } - + //// Obtain the first series. //CrosshairElement element = group.CrosshairElements[0]; diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/19-pump/00-core/HydroPumpCurveColorHelper.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/19-pump/00-core/HydroPumpCurveColorHelper.cs index 56b4963..9b47427 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/19-pump/00-core/HydroPumpCurveColorHelper.cs +++ b/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 }; diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj index 0ee1be5..483c464 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj +++ b/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> diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-viewmodel/01-pump/PumpCurveEquipViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-viewmodel/01-pump/PumpCurveEquipViewModel.cs index e474b3b..51ebdf5 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-viewmodel/01-pump/PumpCurveEquipViewModel.cs +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-viewmodel/01-pump/PumpCurveEquipViewModel.cs @@ -14,6 +14,10 @@ this.StartH= rhs.StartH; this.PipeQ= rhs.PipeQ; this.PipeH= rhs.PipeH; + this.SectQ= rhs.SectQ; + this.SectH= rhs.SectH; + this.SectE = rhs.SectE; + this.SectP= rhs.SectP; this.CurveEquip = rhs.CurveEquip; } @@ -46,7 +50,28 @@ /// <summary> /// 鎬荤鎵▼ /// </summary> - public double PipeH { get; set; } + public double PipeH { get; set; } + + /// <summary> + /// 娴侀噺浜ょ偣 + /// </summary> + public double SectQ { get; set; } + + /// <summary> + /// 鎵▼浜ょ偣 + /// </summary> + public double SectH { get; set; } + + /// <summary> + /// 鏁堢巼浜ょ偣 + /// </summary> + public double? SectE { get; set; } + + /// <summary> + /// 鍔熺巼浜ょ偣 + /// </summary> + public double? SectP { get; set; } + /// <summary> /// 瑁呯疆绾� diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/PumpViewChart.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/PumpViewChart.cs index a39a32c..45a9fca 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/PumpViewChart.cs +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/PumpViewChart.cs @@ -1,4 +1,5 @@ 锘縰sing DevExpress.Utils; +using DevExpress.Utils.Drawing; using DevExpress.XtraCharts; namespace Yw.WinFrmUI.Phart @@ -29,11 +30,12 @@ private TextAnnotation _const_txt_annotation; private PumpCoordinate _coordinate = null; - private PumpCurveViewModel _vm = null; - + private PumpCurveViewModel _vm = null; + private bool _default_visible = false; private bool _power_visible = false; private bool _eff_visible = false; + private bool _equal_eff_visible = false; private bool _split_panel = false; private bool _initial_data = false; @@ -234,23 +236,23 @@ private void ChartControl1_CustomPaint(object sender, CustomPaintEventArgs e) { if (!_initial_data) - return; + return; if (_vm == null) return; - if (_axis_x_flow.Visibility== DefaultBoolean.False) + if (_axis_x_flow.Visibility == DefaultBoolean.False) return; if (e is not DXCustomPaintEventArgs dx_args) return; var cache = dx_args.Cache; - cache.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; - if (_vm.EqualEffList != null && _vm.EqualEffList.Any()) + cache.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; + if (_equal_eff_visible&&_vm.EqualEffList != null && _vm.EqualEffList.Any()) { using Pen pen = new(Color.Green, 2); foreach (var eq_eff in _vm.EqualEffList) { if (!eq_eff.IsValid()) continue; - var eq_eff_pt_list = eq_eff.CurveEqualEff; + var eq_eff_pt_list = eq_eff.CurveEqualEff; var pic_eq_eff_pt_list = new List<Point>(); foreach (var eq_eff_pt in eq_eff_pt_list) { @@ -262,7 +264,7 @@ var pt = new Point(coordinates.Point.X, coordinates.Point.Y); pic_eq_eff_pt_list.Add(pt); } - + var pt_count = pic_eq_eff_pt_list.Count; if (pt_count > 2) { @@ -288,13 +290,42 @@ Rectangle rc = new Rectangle(pic_eq_eff_pt_list[0].X - 2, pic_eq_eff_pt_list[0].Y - 2, 4, 4); using (Brush b = new SolidBrush(pen.Color)) cache.FillEllipse(b, rc); - } + } } } + if (_vm.Equip != null && _vm.Equip.IsValid()) + { + using Pen pen = new(Color.Black, 2); + pen.DashStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot; + + var offset_size = 10; + var qh_pt = _diagram.DiagramToPoint(_vm.Equip.SectQ, _vm.Equip.SectH, _axis_x_flow, _axis_y_head); + var qh_pt_x = qh_pt.Point.X; + var qh_pt_y = qh_pt.Point.Y; + cache.DrawLine(pen, new Point(qh_pt_x, qh_pt_y - offset_size), new Point(qh_pt_x, qh_pt_y + offset_size)); + + if (_eff_visible && _vm.Equip.SectE != null) + { + var qe_pt = _diagram.DiagramToPoint(_vm.Equip.SectQ, _vm.Equip.SectE.Value, _axis_x_flow, _axis_y_eff); + var qe_pt_x = qe_pt.Point.X; + var qe_pt_y = qe_pt.Point.Y; + cache.DrawLine(pen, new Point(qe_pt_x, qe_pt_y - offset_size), new Point(qe_pt_x, qe_pt_y + offset_size)); + } + if (_power_visible && _vm.Equip.SectP != null) + { + var qp_pt = _diagram.DiagramToPoint(_vm.Equip.SectQ, _vm.Equip.SectP.Value, _axis_x_flow, _axis_y_power); + var qp_pt_x = qp_pt.Point.X; + var qp_pt_y = qp_pt.Point.Y; + cache.DrawLine(pen, new Point(qp_pt_x, qp_pt_y - offset_size), new Point(qp_pt_x, qp_pt_y + offset_size)); + } + } } + + + #endregion @@ -321,13 +352,14 @@ /// <summary> /// 璁剧疆鍥捐〃 /// </summary> - public void SetBindingData(PumpCurveViewModel vm, bool default_visible = true, bool split_panel = false, bool eff_visible = false, bool power_visible = true) + public void SetBindingData(PumpCurveViewModel vm, bool default_visible = true, bool split_panel = false, bool eff_visible = false, bool power_visible = true, bool equal_eff_visible = false) { _vm = vm; _default_visible = default_visible; _split_panel = split_panel; _eff_visible = eff_visible; _power_visible = power_visible; + _equal_eff_visible = equal_eff_visible; this.chartControl1.BeginInit(); this.chartControl1.Series.Clear(); this.chartControl1.AnnotationRepository.Clear(); @@ -345,7 +377,8 @@ AddEquip(vm.Equip); AddVariableSpeedList(vm.VariableSpeedList); - AddEqualEffList(vm.EqualEffList); + if (_equal_eff_visible) + AddEqualEffList(vm.EqualEffList); AddEqualPowerList(vm.EqualPowerList); if (vm.Coordinate == null) @@ -409,7 +442,7 @@ var equip_pt = new Yw.Geometry.Point2d(vm.PipeQ, vm.PipeH); AddLineSeries(id, color, _axis_x_flow, _axis_y_head, _default_pane, equip, DevExpress.XtraCharts.DashStyle.DashDotDot); - AddPointSeries(id, color, _axis_x_flow, _axis_y_head, _default_pane, new List<Geometry.Point2d>() { equip_pt }); + // AddPointSeries(id, color, _axis_x_flow, _axis_y_head, _default_pane, new List<Geometry.Point2d>() { equip_pt }, MarkerKind.ThinCross); if (!string.IsNullOrEmpty(caption)) AddAnnotation(id, caption, color, _axis_y_head, _default_pane, equip.Last()); } @@ -513,14 +546,14 @@ #region Add Chart Data - private void AddPointSeries(string id, Color color, AxisXBase axis_x, AxisYBase axis_y, XYDiagramPaneBase pane, List<Yw.Geometry.Point2d> pt_list) + private void AddPointSeries(string id, Color color, AxisXBase axis_x, AxisYBase axis_y, XYDiagramPaneBase pane, List<Yw.Geometry.Point2d> pt_list,MarkerKind marker = MarkerKind.Circle) { if (pt_list == null || !pt_list.Any()) return; var view = new DevExpress.XtraCharts.PointSeriesView(); view.PointMarkerOptions.Size = 8; - view.PointMarkerOptions.Kind = MarkerKind.Circle; + view.PointMarkerOptions.Kind = marker; view.PointMarkerOptions.BorderColor = color; view.Color = color; view.AxisX = axis_x; @@ -838,32 +871,49 @@ _axis_x_flow.SetAxisRange(_coordinate.CoordMinQ, _coordinate.CoordMinQ + _coordinate.GridNumberX * _coordinate.CoordSpaceQ); + + //鏄惁鍒嗗壊闈㈡澘:娴侀噺鏁堢巼鍦ㄤ笂,鍔熺巼鍦ㄤ笅 if (_split_panel) { - var grid_count_head = _coordinate.EndLineNoH - _coordinate.StartLineNoH; - var grid_count_eff = _coordinate.EndLineNoE - _coordinate.StartLineNoE; - int grid_count_add = Math.Max(grid_count_head, grid_count_eff); - if (_eff_visible) - grid_count_add += +5;//澶氫袱鏉� + if (_power_visible) + { + var grid_count_head = _coordinate.EndLineNoH - _coordinate.StartLineNoH; + var grid_count_eff = _coordinate.EndLineNoE - _coordinate.StartLineNoE; + int grid_count_add = Math.Max(grid_count_head, grid_count_eff); + if (_eff_visible) + grid_count_add += +5;//澶氫袱鏉� - var max_axis_head = _coordinate.CoordMinH + _coordinate.EndLineNoH * _coordinate.CoordSpaceH; - var min_axis_head = max_axis_head - grid_count_add * _coordinate.CoordSpaceH; - _axis_y_head.SetAxisRange(min_axis_head, max_axis_head); + var max_axis_head = _coordinate.CoordMinH + _coordinate.EndLineNoH * _coordinate.CoordSpaceH; + var min_axis_head = max_axis_head - grid_count_add * _coordinate.CoordSpaceH; + _axis_y_head.SetAxisRange(min_axis_head, max_axis_head); - var min_axis_eff = _coordinate.CoordMinE + _coordinate.StartLineNoE * _coordinate.CoordSpaceE; - var max_axis_eff = min_axis_eff + grid_count_add * _coordinate.CoordSpaceE; + var min_axis_eff = _coordinate.CoordMinE + _coordinate.StartLineNoE * _coordinate.CoordSpaceE; + var max_axis_eff = min_axis_eff + grid_count_add * _coordinate.CoordSpaceE; - _axis_y_eff.SetAxisRange(min_axis_eff, max_axis_eff); + _axis_y_eff.SetAxisRange(min_axis_eff, max_axis_eff); + _bottom_pane.Visibility = ChartElementVisibility.Visible; + } + else + { + var grid_count_power = _coordinate.EndLineNoP - _coordinate.StartLineNoP; + var grid_delete_head = grid_count_power * _coordinate.CoordSpaceH; + grid_delete_head = _coordinate.CoordMinH < 0 ? -grid_delete_head : grid_delete_head; - //var grid_count_power = _coordinate.EndLineNoP - _coordinate.StartLineNoP ; - //var min_axis_power = _coordinate.CoordMinP + _coordinate.StartLineNoP * _coordinate.CoordSpaceP; - //var max_axis_power = min_axis_power + grid_count_power * _coordinate.CoordSpaceP; - //_axis_y_power.SetAxisRange(min_axis_power, max_axis_power); + var grid_delete_eff = grid_count_power * _coordinate.CoordSpaceE; + grid_delete_eff = _coordinate.CoordMinE < 0 ? -grid_delete_eff : grid_delete_eff; + _axis_y_head.SetAxisRange(_coordinate.CoordMinH - grid_delete_head, _coordinate.CoordMinH + _coordinate.GridNumberY * _coordinate.CoordSpaceH); + _axis_y_eff.SetAxisRange(_coordinate.CoordMinE - grid_delete_eff, _coordinate.CoordMinE + _coordinate.GridNumberY * _coordinate.CoordSpaceE); + + _bottom_pane.Visibility = ChartElementVisibility.Hidden; + } + + if ((!_eff_visible) && (!_power_visible)) + { + _axis_y_head.SetAxisRange(_coordinate.DispMinH(), _coordinate.DispMaxH()); + } _axis_y_power.SetAxisRange(_coordinate.DispMinP(), _coordinate.DispMaxP()); - - _bottom_pane.Visibility = _power_visible ? ChartElementVisibility.Visible : ChartElementVisibility.Hidden; } else { @@ -886,7 +936,6 @@ else if (_eff_visible && (!_power_visible)) { var grid_count_power = _coordinate.EndLineNoP - _coordinate.StartLineNoP; - var grid_delete_head = grid_count_power * _coordinate.CoordSpaceH; grid_delete_head = _coordinate.CoordMinH < 0 ? -grid_delete_head : grid_delete_head; @@ -904,9 +953,9 @@ } _bottom_pane.Visibility = ChartElementVisibility.Hidden; - } + } diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.cs new file mode 100644 index 0000000..e9fa1ab --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.cs @@ -0,0 +1,57 @@ +锘縰sing DevExpress.XtraEditors; + +namespace Yw.WinFrmUI.Phart +{ + public partial class SetEffDlg : DevExpress.XtraEditors.XtraForm + { + public SetEffDlg() + { + InitializeComponent(); + } + + public event Func<List<double>?, bool> VerifyValueChanged; + + public void SetBindingData(double? value = null) + { + this.btnEditValue.EditValue = value; + } + + private bool Verify() + { + this.dxErrorProvider1.ClearErrors(); + if (this.btnEditValue.EditValue == null) + { + this.dxErrorProvider1.SetError(this.btnEditValue, "蹇呭~椤�"); + return false; + } + var list = Yw.Untity.DoubleListHelper.ToList(this.btnEditValue.Text); + if (list == null || !list.Any()) + { + this.dxErrorProvider1.SetError(this.btnEditValue, "鏍煎紡閿欒"); + return false; + } + return true; + } + + private void btnEditValue_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) + { + if (!Verify()) + return; + if (VerifyValueChanged == null) + return; + var list = Yw.Untity.DoubleListHelper.ToList(this.btnEditValue.Text); + if (list == null || !list.Any()) + return; + var bol = this.VerifyValueChanged(list); + if (!bol) + { + XtraMessageBox.Show("鏁板�间笉鍚堢悊!"); + return; + } + this.DialogResult = DialogResult.OK; + this.Close(); + } + + + } +} \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.designer.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.designer.cs new file mode 100644 index 0000000..a382b95 --- /dev/null +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.designer.cs @@ -0,0 +1,125 @@ +锘縩amespace Yw.WinFrmUI.Phart +{ + partial class SetEffDlg + { + /// <summary> + /// Requipuired designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param nameLogin="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Requipuired method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + components = new System.ComponentModel.Container(); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetEffDlg)); + 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(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + btnEditValue = new DevExpress.XtraEditors.ButtonEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)btnEditValue.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); + // + // layoutControl1 + // + layoutControl1.Controls.Add(btnEditValue); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.Root = Root; + layoutControl1.Size = new Size(374, 61); + layoutControl1.TabIndex = 2; + layoutControl1.Text = "layoutControl1"; + // + // btnEditValue + // + btnEditValue.Location = new Point(12, 12); + btnEditValue.Name = "btnEditValue"; + editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); + editorButtonImageOptions1.SvgImageSize = new Size(18, 18); + btnEditValue.Properties.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, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) }); + btnEditValue.Size = new Size(350, 37); + btnEditValue.StyleController = layoutControl1; + btnEditValue.TabIndex = 5; + btnEditValue.ButtonClick += btnEditValue_ButtonClick; + // + // Root + // + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2 }); + Root.Name = "Root"; + Root.Size = new Size(374, 61); + Root.TextVisible = false; + // + // layoutControlItem2 + // + layoutControlItem2.Control = btnEditValue; + layoutControlItem2.Location = new Point(0, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(354, 41); + layoutControlItem2.TextSize = new Size(0, 0); + layoutControlItem2.TextVisible = false; + // + // dxErrorProvider1 + // + dxErrorProvider1.ContainerControl = this; + // + // SetEffDlg + // + AutoScaleDimensions = new SizeF(10F, 22F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(374, 61); + Controls.Add(layoutControl1); + IconOptions.ShowIcon = false; + Margin = new Padding(4, 5, 4, 5); + MaximizeBox = false; + MinimizeBox = false; + Name = "SetEffDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "鏁堢巼鍊�(,閫楀彿鍒嗗壊)"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)btnEditValue.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); + } + + #endregion + private DevExpress.XtraLayout.LayoutControl layoutControl1; + private DevExpress.XtraLayout.LayoutControlGroup Root; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; + private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; + internal DevExpress.XtraEditors.ButtonEdit btnEditValue; + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/03-variable-speed/PumpVariableSpeedCtrl.resx b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.resx similarity index 77% rename from WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/03-variable-speed/PumpVariableSpeedCtrl.resx rename to WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.resx index 8b2ff64..8a862d3 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/03-variable-speed/PumpVariableSpeedCtrl.resx +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/01-view/SetEffDlg.resx @@ -117,4 +117,25 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="editorButtonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAACQCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkNoZWNrIj4NCiAgICA8cG9seWdvbiBwb2ludHM9IjI3 + LDUgMTEsMjEgNSwxNSAyLDE4IDExLDI3IDMwLDggICIgY2xhc3M9IkdyZWVuIiAvPg0KICA8L2c+DQo8 + L3N2Zz4L +</value> + </data> + <metadata name="dxErrorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/01-operation/PumpOperationChart.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/01-operation/PumpOperationChart.cs index 60473b9..3e06e8f 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/01-operation/PumpOperationChart.cs +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/01-operation/PumpOperationChart.cs @@ -36,7 +36,7 @@ private bool _qe_visible = true; private bool _qp_visible = true; - private bool _equip_visible = true; + private bool _equip_visible = true; private Yw.Geometry.CubicSpline2d _equip_line = null; private Yw.Geometry.Point2d _equip_pt = null; private Yw.Geometry.Point2d _equip_sect_pt = null; @@ -280,7 +280,7 @@ public void SetBindingData(PumpOperationViewModel vm) { _vm = vm; - _initial_data = vm != null; + _initial_data = vm != null; UpdateChart(true); } @@ -292,14 +292,13 @@ _equip_pt = new Geometry.Point2d(pipe_flow, pipe_head); _equip_line = null; _equip_sect_pt = null; - _current_equip_sect_pt = null; + _current_equip_sect_pt = null; if (_vm == null) { this.DesignPointChangedEvent?.Invoke(null); return; } - - start_head ??= _coordinate.DispMinH(); + var equip_line = Yw.Geometry.EquipCurveHelper.CalcEquipCurve(_vm.CurveQH, _equip_pt, start_head.Value, out Yw.Geometry.Point2d sect_pt); if (equip_line == null || sect_pt == null) return; @@ -370,6 +369,7 @@ } + this.DesignPointChangedEvent?.Invoke(design_pt_list); UpdateChart(true); } @@ -378,8 +378,8 @@ /// 鍒犻櫎鏇茬嚎 /// </summary> public void Clear() - { - _initial_data = false; + { + _initial_data = false; UpdateChart(true); } @@ -468,6 +468,8 @@ _max_eff = 0; _min_eff = 0; _max_power = 0; _min_power = 1000; + + double _scaleMinH = 1, _scaleMaxH = 1; { var qh_pt_list = _vm.CurveQH.GetPointList(); @@ -484,6 +486,19 @@ _min_head = Math.Min(_min_head, yyy.Min()); _max_head = Math.Max(_max_head, yyy.Max()); + } + + if (_equip_line != null && _equip_line.IsValid() && _equip_visible) + { + var qh_pt_list = _equip_line.GetPointList(); + var xxx = qh_pt_list.Select(x => x.X); + var yyy = qh_pt_list.Select(x => x.Y); + + _min_flow = Math.Min(_min_flow, xxx.Min()); + _max_flow = Math.Max(_max_flow, xxx.Max()); + + _min_head = Math.Min(_min_head, yyy.Min()); + _max_head = Math.Max(_max_head, yyy.Max()); } @@ -1222,7 +1237,8 @@ private void barCekCurveEQVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - _equip_visible = this.barCekCurveEQVisible.Checked; + _equip_visible = this.barCekCurveEQVisible.Checked; + UpdateChart(); } #endregion diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/02-working-view/PumpWorkingViewChart.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/02-working-view/PumpWorkingViewChart.cs index dd62def..5ab64e2 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/02-working-view/PumpWorkingViewChart.cs +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/02-working-view/PumpWorkingViewChart.cs @@ -93,6 +93,7 @@ set { _equip_visible = value; + UpdateChart(); } } @@ -383,7 +384,7 @@ double _scaleMinH = 1, _scaleMaxH = 1; - if (_equip_line!=null&& _equip_line.Any()) + if (_equip_line!=null&& _equip_line.Any()&&_equip_visible) { var qh_pt_list = _equip_line; var xxx = qh_pt_list.Select(x => x.X); diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/03-run-view/PumpRunViewChart.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/03-run-view/PumpRunViewChart.cs index be3d4b0..d42624b 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/03-run-view/PumpRunViewChart.cs +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/03-run-view/PumpRunViewChart.cs @@ -524,7 +524,9 @@ for (int i = 0; i < _vm.Items.Count; i++) { var vm = _vm.Items[i]; - CreateCurrentLineSeries(vm.Id, vm.Color, vm.CurveName, vm.CurveQH, vm.CurveQE, vm.CurveQP); + Yw.Geometry.Point2d run_pt = new Geometry.Point2d(vm.Q , vm.H); + + CreateCurrentLineSeries(vm.Id, vm.Color, vm.CurveName, vm.CurveQH, vm.CurveQE, vm.CurveQP, run_pt); } } } @@ -536,7 +538,7 @@ /// <summary> /// 鍒涘缓绾跨郴鍒� /// </summary> - private void CreateLineSeries(string id, Color color, string curve_name, Yw.Geometry.CubicSpline2d qh, Yw.Geometry.CubicSpline2d qe, Yw.Geometry.CubicSpline2d qp) + private void CreateLineSeries(string id, Color color, string curve_name, Yw.Geometry.CubicSpline2d qh, Yw.Geometry.CubicSpline2d qe, Yw.Geometry.CubicSpline2d qp,Yw.Geometry.Point2d run_pt=null) { var series_qh = new DevExpress.XtraCharts.Series(); series_qh.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Numerical; @@ -567,8 +569,17 @@ var point_qh = pt_qh_list[pt_qh_list.Count - 1]; var anchor_qh_pt = new DevExpress.XtraCharts.PaneAnchorPoint(); anchor_qh_pt.Pane = _default_pane; - anchor_qh_pt.AxisXCoordinate.AxisValue = point_qh.X.ToString(); - anchor_qh_pt.AxisYCoordinate.AxisValue = point_qh.Y.ToString(); + if (run_pt!=null) + { + anchor_qh_pt.AxisXCoordinate.AxisValue = run_pt.X.ToString(); + anchor_qh_pt.AxisYCoordinate.AxisValue = run_pt.Y.ToString(); + } + else + { + anchor_qh_pt.AxisXCoordinate.AxisValue = point_qh.X.ToString(); + anchor_qh_pt.AxisYCoordinate.AxisValue = point_qh.Y.ToString(); + } + var position_qh = new DevExpress.XtraCharts.RelativePosition(); position_qh.Angle = -50; @@ -671,7 +682,7 @@ /// <summary> /// 鍒涘缓绾跨郴鍒� /// </summary> - private void CreateCurrentLineSeries(string id, Color color, string curve_name, Yw.Geometry.CubicSpline2d qh, Yw.Geometry.CubicSpline2d qe, Yw.Geometry.CubicSpline2d qp) + private void CreateCurrentLineSeries(string id, Color color, string curve_name, Yw.Geometry.CubicSpline2d qh, Yw.Geometry.CubicSpline2d qe, Yw.Geometry.CubicSpline2d qp,Yw.Geometry.Point2d run_pt=null) { var series_qh = new DevExpress.XtraCharts.Series(); series_qh.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Numerical; @@ -702,8 +713,17 @@ var point_qh = pt_qh_list[pt_qh_list.Count() - 1]; var anchor_qh_pt = new DevExpress.XtraCharts.PaneAnchorPoint(); anchor_qh_pt.Pane = _default_pane; - anchor_qh_pt.AxisXCoordinate.AxisValue = point_qh.X.ToString(); - anchor_qh_pt.AxisYCoordinate.AxisValue = point_qh.Y.ToString(); + if (run_pt!=null) + { + anchor_qh_pt.AxisXCoordinate.AxisValue = run_pt.X.ToString(); + anchor_qh_pt.AxisYCoordinate.AxisValue = run_pt.Y.ToString(); + } + else + { + + anchor_qh_pt.AxisXCoordinate.AxisValue = point_qh.X.ToString(); + anchor_qh_pt.AxisYCoordinate.AxisValue = point_qh.Y.ToString(); + } var position_qh = new DevExpress.XtraCharts.RelativePosition(); position_qh.Angle = -50; diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-parallel/PumpParallelChart.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-parallel/PumpParallelChart.cs index 61b4e8c..05b114b 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-parallel/PumpParallelChart.cs +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-parallel/PumpParallelChart.cs @@ -427,6 +427,19 @@ double _scaleMinH = 1, _scaleMaxH = 1; + if (_equip_visible&&_equip_line!=null&&_equip_line.IsValid()) + { + var qh_pt_list = _equip_line.GetPointList(); + + var xxx = qh_pt_list.Select(x => x.X); + var yyy = qh_pt_list.Select(x => x.Y); + + _min_flow = Math.Min(_min_flow, xxx.Min()); + _max_flow = Math.Max(_max_flow, xxx.Max()); + + _min_head = Math.Min(_min_head, yyy.Min()); + _max_head = Math.Max(_max_head, yyy.Max()); + } foreach (var vm in _vm_list) { @@ -1121,6 +1134,7 @@ private void barCekCurveEQVisible_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { _equip_visible = this.barCekCurveEQVisible.Checked; + UpdateChart(); } #endregion diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.designer.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.designer.cs index c39432c..a8199c4 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.designer.cs +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.designer.cs @@ -28,177 +28,171 @@ /// </summary> private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - this.btnCancel = new DevExpress.XtraEditors.SimpleButton(); - this.btnOk = new DevExpress.XtraEditors.SimpleButton(); - this.txtX = new DevExpress.XtraEditors.TextEdit(); - this.txtY = new DevExpress.XtraEditors.TextEdit(); - this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); - this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); - this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); - this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); - this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); - this.dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components); - ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); - this.layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.txtX.Properties)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.txtY.Properties)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).BeginInit(); - this.SuspendLayout(); + components = new System.ComponentModel.Container(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + btnCancel = new DevExpress.XtraEditors.SimpleButton(); + btnOk = new DevExpress.XtraEditors.SimpleButton(); + txtX = new DevExpress.XtraEditors.TextEdit(); + txtY = new DevExpress.XtraEditors.TextEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); + emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)txtX.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)txtY.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); // // layoutControl1 // - this.layoutControl1.Controls.Add(this.btnCancel); - this.layoutControl1.Controls.Add(this.btnOk); - this.layoutControl1.Controls.Add(this.txtX); - this.layoutControl1.Controls.Add(this.txtY); - this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.layoutControl1.Location = new System.Drawing.Point(0, 0); - this.layoutControl1.Name = "layoutControl1"; - this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(924, 0, 975, 600); - this.layoutControl1.Root = this.Root; - this.layoutControl1.Size = new System.Drawing.Size(316, 126); - this.layoutControl1.TabIndex = 2; - this.layoutControl1.Text = "layoutControl1"; + layoutControl1.Controls.Add(btnCancel); + layoutControl1.Controls.Add(btnOk); + layoutControl1.Controls.Add(txtX); + layoutControl1.Controls.Add(txtY); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(924, 0, 975, 600); + layoutControl1.Root = Root; + layoutControl1.Size = new Size(319, 120); + layoutControl1.TabIndex = 2; + layoutControl1.Text = "layoutControl1"; // // btnCancel // - this.btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; - this.btnCancel.Appearance.Options.UseBackColor = true; - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(233, 76); - this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(71, 32); - this.btnCancel.StyleController = this.layoutControl1; - this.btnCancel.TabIndex = 10; - this.btnCancel.Text = "鍙栨秷"; + btnCancel.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Warning; + btnCancel.Appearance.Options.UseBackColor = true; + btnCancel.DialogResult = DialogResult.Cancel; + btnCancel.Location = new Point(235, 76); + btnCancel.Margin = new Padding(4, 5, 4, 5); + btnCancel.Name = "btnCancel"; + btnCancel.Size = new Size(72, 32); + btnCancel.StyleController = layoutControl1; + btnCancel.TabIndex = 10; + btnCancel.Text = "鍙栨秷"; // // btnOk // - this.btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; - this.btnOk.Appearance.Options.UseBackColor = true; - this.btnOk.Location = new System.Drawing.Point(160, 76); - this.btnOk.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.btnOk.Name = "btnOk"; - this.btnOk.Size = new System.Drawing.Size(69, 32); - this.btnOk.StyleController = this.layoutControl1; - this.btnOk.TabIndex = 9; - this.btnOk.Text = "纭畾"; - this.btnOk.Click += new System.EventHandler(this.btnOk_Click); + btnOk.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Primary; + btnOk.Appearance.Options.UseBackColor = true; + btnOk.Location = new Point(161, 76); + btnOk.Margin = new Padding(4, 5, 4, 5); + btnOk.Name = "btnOk"; + btnOk.Size = new Size(70, 32); + btnOk.StyleController = layoutControl1; + btnOk.TabIndex = 9; + btnOk.Text = "纭畾"; + btnOk.Click += btnOk_Click; // // txtX // - this.txtX.Location = new System.Drawing.Point(78, 12); - this.txtX.Name = "txtX"; - this.txtX.Size = new System.Drawing.Size(226, 28); - this.txtX.StyleController = this.layoutControl1; - this.txtX.TabIndex = 4; + txtX.Location = new Point(78, 12); + txtX.Name = "txtX"; + txtX.Size = new Size(229, 28); + txtX.StyleController = layoutControl1; + txtX.TabIndex = 4; // // txtY // - this.txtY.Location = new System.Drawing.Point(78, 44); - this.txtY.Name = "txtY"; - this.txtY.Size = new System.Drawing.Size(226, 28); - this.txtY.StyleController = this.layoutControl1; - this.txtY.TabIndex = 5; + txtY.Location = new Point(78, 44); + txtY.Name = "txtY"; + txtY.Size = new Size(229, 28); + txtY.StyleController = layoutControl1; + txtY.TabIndex = 5; // // Root // - this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; - this.Root.GroupBordersVisible = false; - this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { - this.layoutControlItem1, - this.layoutControlItem2, - this.layoutControlItem3, - this.emptySpaceItem1, - this.layoutControlItem4}); - this.Root.Name = "Root"; - this.Root.Size = new System.Drawing.Size(316, 126); - this.Root.TextVisible = false; + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, emptySpaceItem1, layoutControlItem4 }); + Root.Name = "Root"; + Root.Size = new Size(319, 120); + Root.TextVisible = false; // // layoutControlItem1 // - this.layoutControlItem1.Control = this.txtX; - this.layoutControlItem1.Location = new System.Drawing.Point(0, 0); - this.layoutControlItem1.Name = "layoutControlItem1"; - this.layoutControlItem1.Size = new System.Drawing.Size(296, 32); - this.layoutControlItem1.Text = "娴侀噺锛�"; - this.layoutControlItem1.TextSize = new System.Drawing.Size(54, 22); + layoutControlItem1.Control = txtX; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(299, 32); + layoutControlItem1.Text = "娴侀噺锛�"; + layoutControlItem1.TextSize = new Size(54, 22); // // layoutControlItem2 // - this.layoutControlItem2.Control = this.txtY; - this.layoutControlItem2.Location = new System.Drawing.Point(0, 32); - this.layoutControlItem2.Name = "layoutControlItem2"; - this.layoutControlItem2.Size = new System.Drawing.Size(296, 32); - this.layoutControlItem2.Text = "鎵▼:"; - this.layoutControlItem2.TextSize = new System.Drawing.Size(54, 22); + layoutControlItem2.Control = txtY; + layoutControlItem2.Location = new Point(0, 32); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(299, 32); + layoutControlItem2.Text = "鎵▼:"; + layoutControlItem2.TextSize = new Size(54, 22); // // layoutControlItem3 // - this.layoutControlItem3.Control = this.btnCancel; - this.layoutControlItem3.Location = new System.Drawing.Point(221, 64); - this.layoutControlItem3.Name = "layoutControlItem3"; - this.layoutControlItem3.Size = new System.Drawing.Size(75, 42); - this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0); - this.layoutControlItem3.TextVisible = false; + layoutControlItem3.Control = btnCancel; + layoutControlItem3.Location = new Point(223, 64); + layoutControlItem3.Name = "layoutControlItem3"; + layoutControlItem3.Size = new Size(76, 36); + layoutControlItem3.TextSize = new Size(0, 0); + layoutControlItem3.TextVisible = false; // // emptySpaceItem1 // - this.emptySpaceItem1.AllowHotTrack = false; - this.emptySpaceItem1.Location = new System.Drawing.Point(0, 64); - this.emptySpaceItem1.Name = "emptySpaceItem1"; - this.emptySpaceItem1.Size = new System.Drawing.Size(148, 42); - this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); + emptySpaceItem1.AllowHotTrack = false; + emptySpaceItem1.Location = new Point(0, 64); + emptySpaceItem1.Name = "emptySpaceItem1"; + emptySpaceItem1.Size = new Size(149, 36); + emptySpaceItem1.TextSize = new Size(0, 0); // // layoutControlItem4 // - this.layoutControlItem4.Control = this.btnOk; - this.layoutControlItem4.Location = new System.Drawing.Point(148, 64); - this.layoutControlItem4.Name = "layoutControlItem4"; - this.layoutControlItem4.Size = new System.Drawing.Size(73, 42); - this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0); - this.layoutControlItem4.TextVisible = false; + layoutControlItem4.Control = btnOk; + layoutControlItem4.Location = new Point(149, 64); + layoutControlItem4.Name = "layoutControlItem4"; + layoutControlItem4.Size = new Size(74, 36); + layoutControlItem4.TextSize = new Size(0, 0); + layoutControlItem4.TextVisible = false; // // dxErrorProvider1 // - this.dxErrorProvider1.ContainerControl = this; + dxErrorProvider1.ContainerControl = this; // // SetPointDlg // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(316, 126); - this.Controls.Add(this.layoutControl1); - this.IconOptions.ShowIcon = false; - this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "SetPointDlg"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "鐐�"; - ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); - this.layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.txtX.Properties)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.txtY.Properties)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).EndInit(); - this.ResumeLayout(false); - + AutoScaleDimensions = new SizeF(10F, 22F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(319, 120); + Controls.Add(layoutControl1); + IconOptions.ShowIcon = false; + Margin = new Padding(4, 5, 4, 5); + MaximizeBox = false; + MinimizeBox = false; + Name = "SetPointDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "鐐�"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)txtX.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)txtY.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); + ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); } #endregion diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.resx b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.resx index e64ae99..43b467c 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.resx +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetPointDlg.resx @@ -1,17 +1,17 @@ 锘�<?xml version="1.0" encoding="utf-8"?> <root> - <!-- - Microsoft ResX Schema - + <!-- + Microsoft ResX Schema + Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes associated with the data types. - + Example: - + ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> @@ -26,36 +26,36 @@ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> - - There are any number of "resheader" rows that contain simple + + There are any number of "resheader" rows that contain simple name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. - + mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with + value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. - + mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with + value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array + value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> @@ -66,10 +66,10 @@ <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> - <xsd:sequipuence> + <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequipuence> - <xsd:attribute name="name" use="requipuired" type="xsd:string" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> @@ -83,11 +83,11 @@ </xsd:element> <xsd:element name="data"> <xsd:complexType> - <xsd:sequipuence> + <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequipuence> - <xsd:attribute name="name" type="xsd:string" use="requipuired" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> @@ -95,10 +95,10 @@ </xsd:element> <xsd:element name="resheader"> <xsd:complexType> - <xsd:sequipuence> + <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequipuence> - <xsd:attribute name="name" type="xsd:string" use="requipuired" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.designer.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.designer.cs index 0fcfbf6..cffa4e1 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.designer.cs +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.designer.cs @@ -28,97 +28,93 @@ /// </summary> private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); + components = new System.ComponentModel.Container(); + DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SetValueDlg)); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject(); - DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject(); - this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); - this.Root = new DevExpress.XtraLayout.LayoutControlGroup(); - this.btnEditValue = new DevExpress.XtraEditors.ButtonEdit(); - this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); - this.dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components); - ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit(); - this.layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.btnEditValue.Properties)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).BeginInit(); - this.SuspendLayout(); + 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(); + layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); + btnEditValue = new DevExpress.XtraEditors.ButtonEdit(); + Root = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); + dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); + ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); + layoutControl1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)btnEditValue.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); + SuspendLayout(); // // layoutControl1 // - this.layoutControl1.Controls.Add(this.btnEditValue); - this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.layoutControl1.Location = new System.Drawing.Point(0, 0); - this.layoutControl1.Name = "layoutControl1"; - this.layoutControl1.Root = this.Root; - this.layoutControl1.Size = new System.Drawing.Size(374, 82); - this.layoutControl1.TabIndex = 2; - this.layoutControl1.Text = "layoutControl1"; - // - // Root - // - this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; - this.Root.GroupBordersVisible = false; - this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { - this.layoutControlItem2}); - this.Root.Name = "Root"; - this.Root.Size = new System.Drawing.Size(374, 82); - this.Root.TextVisible = false; + layoutControl1.Controls.Add(btnEditValue); + layoutControl1.Dock = DockStyle.Fill; + layoutControl1.Location = new Point(0, 0); + layoutControl1.Name = "layoutControl1"; + layoutControl1.Root = Root; + layoutControl1.Size = new Size(374, 61); + layoutControl1.TabIndex = 2; + layoutControl1.Text = "layoutControl1"; // // btnEditValue // - this.btnEditValue.Location = new System.Drawing.Point(22, 22); - this.btnEditValue.Name = "btnEditValue"; - editorButtonImageOptions2.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("editorButtonImageOptions2.SvgImage"))); - editorButtonImageOptions2.SvgImageSize = new System.Drawing.Size(18, 18); - this.btnEditValue.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { - new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); - this.btnEditValue.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); - this.btnEditValue.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False"); - this.btnEditValue.Size = new System.Drawing.Size(330, 37); - this.btnEditValue.StyleController = this.layoutControl1; - this.btnEditValue.TabIndex = 5; - this.btnEditValue.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.btnEditValue_ButtonClick); + btnEditValue.Location = new Point(12, 12); + btnEditValue.Name = "btnEditValue"; + editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage"); + editorButtonImageOptions1.SvgImageSize = new Size(18, 18); + btnEditValue.Properties.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, "", null, null, DevExpress.Utils.ToolTipAnchor.Default) }); + btnEditValue.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager)); + btnEditValue.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False"); + btnEditValue.Size = new Size(350, 37); + btnEditValue.StyleController = layoutControl1; + btnEditValue.TabIndex = 5; + btnEditValue.ButtonClick += btnEditValue_ButtonClick; + // + // Root + // + Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; + Root.GroupBordersVisible = false; + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2 }); + Root.Name = "Root"; + Root.Size = new Size(374, 61); + Root.TextVisible = false; // // layoutControlItem2 // - this.layoutControlItem2.Control = this.btnEditValue; - this.layoutControlItem2.Location = new System.Drawing.Point(0, 0); - this.layoutControlItem2.Name = "layoutControlItem2"; - this.layoutControlItem2.Size = new System.Drawing.Size(354, 62); - this.layoutControlItem2.Spacing = new DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10); - this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0); - this.layoutControlItem2.TextVisible = false; + layoutControlItem2.Control = btnEditValue; + layoutControlItem2.Location = new Point(0, 0); + layoutControlItem2.Name = "layoutControlItem2"; + layoutControlItem2.Size = new Size(354, 41); + layoutControlItem2.TextSize = new Size(0, 0); + layoutControlItem2.TextVisible = false; // // dxErrorProvider1 // - this.dxErrorProvider1.ContainerControl = this; + dxErrorProvider1.ContainerControl = this; // - // AxisValueDlg + // SetValueDlg // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(374, 82); - this.Controls.Add(this.layoutControl1); - this.IconOptions.ShowIcon = false; - this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "AxisValueDlg"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "鍊�"; - ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); - this.layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.btnEditValue.Properties)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider1)).EndInit(); - this.ResumeLayout(false); - + AutoScaleDimensions = new SizeF(10F, 22F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(374, 61); + Controls.Add(layoutControl1); + IconOptions.ShowIcon = false; + Margin = new Padding(4, 5, 4, 5); + MaximizeBox = false; + MinimizeBox = false; + Name = "SetValueDlg"; + StartPosition = FormStartPosition.CenterScreen; + Text = "鍊�"; + ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); + layoutControl1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)btnEditValue.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)Root).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); + ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); + ResumeLayout(false); } #endregion diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.resx b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.resx index 651a0bd..8a862d3 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.resx +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/02-pump/04-special/04-variable-speed/SetValueDlg.resx @@ -1,17 +1,17 @@ 锘�<?xml version="1.0" encoding="utf-8"?> <root> - <!-- - Microsoft ResX Schema - + <!-- + Microsoft ResX Schema + Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes associated with the data types. - + Example: - + ... ado.net/XML headers & schema ... <resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="version">2.0</resheader> @@ -26,36 +26,36 @@ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <comment>This is a comment</comment> </data> - - There are any number of "resheader" rows that contain simple + + There are any number of "resheader" rows that contain simple name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can read any of the formats listed below. - + mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with + value : The object must be serialized with : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. - + mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with + value : The object must be serialized with : System.Runtime.Serialization.Formatters.Soap.SoapFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array + value : The object must be serialized into a byte array : using a System.ComponentModel.TypeConverter : and then encoded with base64 encoding. --> @@ -66,10 +66,10 @@ <xsd:choice maxOccurs="unbounded"> <xsd:element name="metadata"> <xsd:complexType> - <xsd:sequipuence> + <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequipuence> - <xsd:attribute name="name" use="requipuired" type="xsd:string" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute ref="xml:space" /> @@ -83,11 +83,11 @@ </xsd:element> <xsd:element name="data"> <xsd:complexType> - <xsd:sequipuence> + <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequipuence> - <xsd:attribute name="name" type="xsd:string" use="requipuired" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute ref="xml:space" /> @@ -95,10 +95,10 @@ </xsd:element> <xsd:element name="resheader"> <xsd:complexType> - <xsd:sequipuence> + <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequipuence> - <xsd:attribute name="name" type="xsd:string" use="requipuired" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> </xsd:complexType> </xsd:element> </xsd:choice> @@ -117,10 +117,10 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> - <assembly alias="DevExpress.Data.v22.2" name="DevExpress.Data.v22.2, Version=22.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> - <data name="editorButtonImageOptions2.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v22.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> + <data name="editorButtonImageOptions1.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIyLjIsIFZlcnNpb249MjIuMi40 + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAACQCAAAC77u/ PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/Yw.WinFrmUI.Phart.Core.csproj b/WinFrmUI/Yw.WinFrmUI.Phart.Core/Yw.WinFrmUI.Phart.Core.csproj index 6708ab5..1f29a01 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/Yw.WinFrmUI.Phart.Core.csproj +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/Yw.WinFrmUI.Phart.Core.csproj @@ -88,6 +88,18 @@ </ItemGroup> <ItemGroup> + <Compile Include="02-pump\04-special\04-variable-speed\SetPointDlg.cs" /> + <Compile Include="02-pump\04-special\04-variable-speed\SetPointDlg.designer.cs" /> + <Compile Include="02-pump\04-special\04-variable-speed\SetValueDlg.cs" /> + <Compile Include="02-pump\04-special\04-variable-speed\SetValueDlg.designer.cs" /> + </ItemGroup> + + <ItemGroup> + <EmbeddedResource Include="02-pump\04-special\04-variable-speed\SetPointDlg.resx" /> + <EmbeddedResource Include="02-pump\04-special\04-variable-speed\SetValueDlg.resx" /> + </ItemGroup> + + <ItemGroup> <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> <PackageReference Include="NPOI" Version="2.7.1" /> <PackageReference Include="Yw.Pump.Core" Version="3.1.7" /> @@ -99,6 +111,9 @@ </ItemGroup> <ItemGroup> + <Compile Update="02-pump\01-view\SetEffDlg.cs"> + <SubType>Form</SubType> + </Compile> <Compile Update="02-pump\02-edit\PumpEditChart.cs"> <SubType>UserControl</SubType> </Compile> -- Gitblit v1.9.3