Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0
| | |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Position2d), revitFlowmeter, nameof(revitFlowmeter.Position)); |
| | | flowmeter.Position3d = new Yw.Model.Hydro.Position3d(revitFlowmeter.Position.X, revitFlowmeter.Position.Y, revitFlowmeter.Position.Z); |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.Position3d), revitFlowmeter, nameof(revitFlowmeter.Position)); |
| | | flowmeter.CurrentFlow = revitFlowmeter.CurrentFlow; |
| | | flowmeter.UpdatePropStatus(nameof(flowmeter.CurrentFlow), revitFlowmeter, nameof(revitFlowmeter.CurrentFlow)); |
| | | flowmeter.ScenePropValueList = revitFlowmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Position2d), revitPressmeter, nameof(revitPressmeter.Position)); |
| | | pressmeter.Position3d = new Yw.Model.Hydro.Position3d(revitPressmeter.Position.X, revitPressmeter.Position.Y, revitPressmeter.Position.Z); |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.Position3d), revitPressmeter, nameof(revitPressmeter.Position)); |
| | | pressmeter.CurrentPress = revitPressmeter.CurrentPress; |
| | | pressmeter.UpdatePropStatus(nameof(pressmeter.CurrentPress), revitPressmeter, nameof(revitPressmeter.CurrentPress)); |
| | | pressmeter.ScenePropValueList = revitPressmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <PackageReference Include="Yw.Service.Hydro.Core" Version="3.6.5" /> |
| | | <PackageReference Include="Yw.Service.Hydro.Core" Version="3.6.6" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
ÎļþÃû´Ó Service/HStation.Service.Revit.Core/02-parter/02-node/02-junction/05-other/RevitFlowmeter.cs ÐÞ¸Ä |
| | |
| | | /// </summary> |
| | | public RevitFlowmeter(RevitFlowmeter rhs) : base(rhs) |
| | | { |
| | | |
| | | this.CurrentFlow = rhs.CurrentFlow; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å½åæµé |
| | | /// </summary> |
| | | public double? CurrentFlow { get; set; } |
| | | |
| | | |
| | | } |
ÎļþÃû´Ó Service/HStation.Service.Revit.Core/02-parter/02-node/02-junction/05-other/RevitPressmeter.cs ÐÞ¸Ä |
| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å½ååå |
| | | /// </summary> |
| | | public double? CurrentPress { get; set; } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | public const string LinkStatusValve = "éé¨ç¶æ"; |
| | | |
| | | /// <summary> |
| | | /// éé¨ç±»åï¼éé¨ï¼ |
| | | /// éé¨ç±»å |
| | | /// </summary> |
| | | public const string ValveType = "éé¨ç±»å"; |
| | | |
| | | /// <summary> |
| | | /// éé¨è®¾ç½®ï¼éé¨ï¼ |
| | | /// éé¨è®¾ç½® |
| | | /// </summary> |
| | | public const string ValveSetting = "éé¨è®¾ç½®"; |
| | | |
| | | /// <summary> |
| | | /// éé¨å¼åº¦ |
| | | /// </summary> |
| | | public const string ValveOpeningDegree = "éé¨å¼åº¦"; |
| | | |
| | | /// <summary> |
| | | /// æä¸ç±»å |
| | |
| | | /// </summary> |
| | | public const string ClanName = "æåç§°"; |
| | | |
| | | /// <summary> |
| | | /// æµé |
| | | /// </summary> |
| | | public const string Flow = "æµé"; |
| | | |
| | | /// <summary> |
| | | /// åå |
| | | /// </summary> |
| | | public const string Press = "åå"; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region Flow |
| | | |
| | | if (jobject[RevitJsonProp.Flow].MatchNumeric(out double flow)) |
| | | { |
| | | flowmeter.CurrentFlow = flow; |
| | | } |
| | | else |
| | | { |
| | | flowmeter.AppendOrUpdatePropStatus(nameof(flowmeter.CurrentFlow), ePropStatus.Abnormal, "[æµé]ç¼ºå°æè
æ°æ®æ ¼å¼é误"); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | return flowmeter; |
| | | } |
| | | |
| | |
| | | else |
| | | { |
| | | pressmeter.AppendOrUpdatePropStatus(nameof(pressmeter.DemandPattern), ePropStatus.Abnormal, "缺å°[éæ°´æ¨¡å¼]"); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region Press |
| | | |
| | | if (jobject[RevitJsonProp.Press].MatchNumeric(out double press)) |
| | | { |
| | | pressmeter.CurrentPress = press; |
| | | } |
| | | else |
| | | { |
| | | pressmeter.AppendOrUpdatePropStatus(nameof(pressmeter.CurrentPress), ePropStatus.Abnormal, "[åå]ç¼ºå°æè
æ°æ®æ ¼å¼é误"); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region OpeningDegree |
| | | |
| | | if (jobject[RevitJsonProp.ValveOpeningDegree].MatchNumeric(out double openingDegree)) |
| | | { |
| | | valve.OpeningDegree = openingDegree; |
| | | } |
| | | else |
| | | { |
| | | valve.OpeningDegree = 100; |
| | | valve.AppendOrUpdatePropStatus(nameof(valve.MinorLoss), ePropStatus.Abnormal, "[éé¨å¼åº¦]ç¼ºå°æè
æ°æ®æ ¼å¼é误ï¼ä½¿ç¨é»è®¤å¼(100)è¿è¡ä¿®æ£"); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ValveSetting |
| | | |
| | | if (jobject.ParseString(RevitJsonProp.ValveSetting, out string valveSetting)) |
| | |
| | | xtrPerform2dChart1.DefinePointVisible = false; |
| | | xtrPerform2dChart1.Dock = DockStyle.Fill; |
| | | xtrPerform2dChart1.LineVisible = false; |
| | | xtrPerform2dChart1.Location = new Point(164, 101); |
| | | xtrPerform2dChart1.Margin = new Padding(1, 1, 1, 1); |
| | | xtrPerform2dChart1.Location = new Point(336, 148); |
| | | xtrPerform2dChart1.Margin = new Padding(1, 2, 1, 2); |
| | | xtrPerform2dChart1.Name = "xtrPerform2dChart1"; |
| | | xtrPerform2dChart1.Size = new Size(228, 411); |
| | | xtrPerform2dChart1.Size = new Size(224, 657); |
| | | xtrPerform2dChart1.TabIndex = 1; |
| | | // |
| | | // sidePanel2 |
| | |
| | | sidePanel2.Controls.Add(xhsPumpMainPhartListCtrl1); |
| | | sidePanel2.Dock = DockStyle.Fill; |
| | | sidePanel2.Location = new Point(0, 0); |
| | | sidePanel2.Margin = new Padding(2, 2, 2, 2); |
| | | sidePanel2.Name = "sidePanel2"; |
| | | sidePanel2.Size = new Size(163, 388); |
| | | sidePanel2.Size = new Size(335, 623); |
| | | sidePanel2.TabIndex = 4; |
| | | sidePanel2.Text = "sidePanel2"; |
| | | // |
| | |
| | | xhsPumpMainPhartListCtrl1.Appearance.Options.UseBackColor = true; |
| | | xhsPumpMainPhartListCtrl1.Dock = DockStyle.Fill; |
| | | xhsPumpMainPhartListCtrl1.Location = new Point(0, 0); |
| | | xhsPumpMainPhartListCtrl1.Margin = new Padding(4, 5, 4, 5); |
| | | xhsPumpMainPhartListCtrl1.Margin = new Padding(6, 8, 6, 8); |
| | | xhsPumpMainPhartListCtrl1.Name = "xhsPumpMainPhartListCtrl1"; |
| | | xhsPumpMainPhartListCtrl1.Size = new Size(163, 388); |
| | | xhsPumpMainPhartListCtrl1.Size = new Size(335, 623); |
| | | xhsPumpMainPhartListCtrl1.TabIndex = 0; |
| | | // |
| | | // sidePanel1 |
| | | // |
| | | sidePanel1.Controls.Add(tabPane1); |
| | | sidePanel1.Dock = DockStyle.Right; |
| | | sidePanel1.Location = new Point(392, 101); |
| | | sidePanel1.Margin = new Padding(2, 2, 2, 2); |
| | | sidePanel1.Location = new Point(560, 148); |
| | | sidePanel1.Name = "sidePanel1"; |
| | | sidePanel1.Size = new Size(350, 411); |
| | | sidePanel1.Size = new Size(500, 657); |
| | | sidePanel1.TabIndex = 3; |
| | | sidePanel1.Text = "sidePanel1"; |
| | | // |
| | |
| | | tabPane1.Controls.Add(tabNavigationPage1); |
| | | tabPane1.Dock = DockStyle.Fill; |
| | | tabPane1.Location = new Point(1, 0); |
| | | tabPane1.Margin = new Padding(2, 2, 2, 2); |
| | | tabPane1.Name = "tabPane1"; |
| | | tabPane1.Pages.AddRange(new DevExpress.XtraBars.Navigation.NavigationPageBase[] { tabNavigationPage1 }); |
| | | tabPane1.RegularSize = new Size(349, 411); |
| | | tabPane1.RegularSize = new Size(499, 657); |
| | | tabPane1.SelectedPage = tabNavigationPage1; |
| | | tabPane1.Size = new Size(349, 411); |
| | | tabPane1.Size = new Size(499, 657); |
| | | tabPane1.TabIndex = 0; |
| | | tabPane1.Text = "tabPane1"; |
| | | // |
| | |
| | | // |
| | | tabNavigationPage1.Caption = "è¿è¡åæ°"; |
| | | tabNavigationPage1.Controls.Add(pumpPerformInfoCtrl1); |
| | | tabNavigationPage1.Margin = new Padding(2, 2, 2, 2); |
| | | tabNavigationPage1.Name = "tabNavigationPage1"; |
| | | tabNavigationPage1.Size = new Size(349, 378); |
| | | tabNavigationPage1.Size = new Size(499, 608); |
| | | // |
| | | // pumpPerformInfoCtrl1 |
| | | // |
| | | pumpPerformInfoCtrl1.Dock = DockStyle.Fill; |
| | | pumpPerformInfoCtrl1.Location = new Point(0, 0); |
| | | pumpPerformInfoCtrl1.Margin = new Padding(1, 1, 1, 1); |
| | | pumpPerformInfoCtrl1.Margin = new Padding(1, 2, 1, 2); |
| | | pumpPerformInfoCtrl1.Name = "pumpPerformInfoCtrl1"; |
| | | pumpPerformInfoCtrl1.Size = new Size(349, 378); |
| | | pumpPerformInfoCtrl1.Size = new Size(499, 608); |
| | | pumpPerformInfoCtrl1.TabIndex = 0; |
| | | // |
| | | // ribbonControl1 |
| | | // |
| | | ribbonControl1.EmptyAreaImageOptions.ImagePadding = new Padding(43, 47, 43, 47); |
| | | ribbonControl1.ExpandCollapseItem.Id = 0; |
| | | ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; |
| | | ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, BtnAdd, BtnEdit, BtnDelete, barBtnEditPumpCurve, BarBtnEidtPumpPart, barCheckItem1, barBtnImportByExcel, barBtnImportByPicture, barButtonItem3, barButtonItem4, barBtnDelete, barBtnAddText, barBtnUpdateimportance, barBtnOtherName, barBtnEditChart, barBtnImportByOnePoint, barBtnVariableSpeed }); |
| | | ribbonControl1.Location = new Point(0, 0); |
| | | ribbonControl1.Margin = new Padding(4, 5, 4, 5); |
| | | ribbonControl1.MaxItemId = 34; |
| | | ribbonControl1.Name = "ribbonControl1"; |
| | | ribbonControl1.OptionsMenuMinWidth = 471; |
| | | ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); |
| | | ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; |
| | | ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False; |
| | | ribbonControl1.ShowPageHeadersInFormCaption = DevExpress.Utils.DefaultBoolean.False; |
| | | ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide; |
| | | ribbonControl1.Size = new Size(742, 101); |
| | | ribbonControl1.Size = new Size(1060, 148); |
| | | ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden; |
| | | // |
| | | // BtnAdd |
| | |
| | | dockPanel1.Controls.Add(dockPanel1_Container); |
| | | dockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left; |
| | | dockPanel1.ID = new Guid("202c2203-fb3a-4b47-a9cb-083c698bd2ac"); |
| | | dockPanel1.Location = new Point(0, 101); |
| | | dockPanel1.Margin = new Padding(2, 2, 2, 2); |
| | | dockPanel1.Location = new Point(0, 148); |
| | | dockPanel1.Name = "dockPanel1"; |
| | | dockPanel1.OriginalSize = new Size(235, 200); |
| | | dockPanel1.Size = new Size(164, 411); |
| | | dockPanel1.Size = new Size(336, 657); |
| | | dockPanel1.Text = "æ²çº¿å表"; |
| | | // |
| | | // dockPanel1_Container |
| | | // |
| | | dockPanel1_Container.Controls.Add(sidePanel2); |
| | | dockPanel1_Container.Location = new Point(0, 23); |
| | | dockPanel1_Container.Margin = new Padding(2, 2, 2, 2); |
| | | dockPanel1_Container.Location = new Point(0, 34); |
| | | dockPanel1_Container.Name = "dockPanel1_Container"; |
| | | dockPanel1_Container.Size = new Size(163, 388); |
| | | dockPanel1_Container.Size = new Size(335, 623); |
| | | dockPanel1_Container.TabIndex = 0; |
| | | // |
| | | // XhsPumpMainPhartPanel |
| | | // |
| | | Appearance.BackColor = SystemColors.Control; |
| | | Appearance.Options.UseBackColor = true; |
| | | AutoScaleDimensions = new SizeF(7F, 14F); |
| | | AutoScaleDimensions = new SizeF(10F, 22F); |
| | | AutoScaleMode = AutoScaleMode.Font; |
| | | Controls.Add(xtrPerform2dChart1); |
| | | Controls.Add(sidePanel1); |
| | | Controls.Add(dockPanel1); |
| | | Controls.Add(ribbonControl1); |
| | | Margin = new Padding(4, 5, 4, 5); |
| | | Margin = new Padding(6, 8, 6, 8); |
| | | Name = "XhsPumpMainPhartPanel"; |
| | | Size = new Size(742, 512); |
| | | Size = new Size(1060, 805); |
| | | sidePanel2.ResumeLayout(false); |
| | | sidePanel1.ResumeLayout(false); |
| | | ((System.ComponentModel.ISupportInitialize)tabPane1).EndInit(); |
| | |
| | | private void barBtnImportByOnePoint_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var dlg = new Yw.WinFrmUI.Phart.ImportPumpPerform2dByOnePointDlg(); |
| | | if (_pump_main != null) |
| | | { |
| | | dlg.Set(_pump_main.RatedFlow, _pump_main.RatedHead, _pump_main.RatedSpeed, _pump_main.RatedEfficiency); |
| | | } |
| | | |
| | | dlg.ReloadDataEvent += async (other_name, qh, qe, qp) => |
| | | { |
| | | var bol = await Import(other_name, qh, qe, qp); |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | |
| | | 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 |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | |
| | | pump.RatedH = matching.RatedH; |
| | | pump.RatedN = matching.RatedN; |
| | | pump.RatedHz = matching.RatedHz; |
| | | pump.SpeedRatio = Math.Round(matching.CurrentHz / matching.RatedHz, 1); |
| | | |
| | | if (!pump.DbLocked) |
| | | { |
| | |
| | | var input = AssetsMatchingParasHelper.Create(hydroInfo, pumpInfo, _allHydroCalcuResultListFunc?.Invoke()); |
| | | var dlg = new SinglePumpAnalyDlg(); |
| | | dlg.SetBindindData(input); |
| | | //dlg.ReloadDataEvent += (output) => |
| | | //{ |
| | | // bol = AssetsMatchingParasHelper.Apply(hydroInfo, output); |
| | | // if (bol) |
| | | // { |
| | | // propertyViewModel.UpdateProperty(pumpInfo, hydroInfo.GetAllParters()); |
| | | // } |
| | | //}; |
| | | dlg.ReloadDataEvent += (output) => |
| | | { |
| | | var bol = AssetsMatchingParasHelper.Apply(hydroInfo, output); |
| | | if (bol) |
| | | { |
| | | propViewModel.UpdateProperty(pumpInfo, hydroInfo.GetAllParters()); |
| | | } |
| | | return bol; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | return true; |
| | | } |
| | |
| | | // |
| | | sidePanel1.Controls.Add(singlePumpAnalyInfoCtrl1); |
| | | sidePanel1.Dock = DockStyle.Right; |
| | | sidePanel1.Location = new Point(900, 48); |
| | | sidePanel1.Location = new Point(800, 48); |
| | | sidePanel1.Name = "sidePanel1"; |
| | | sidePanel1.Size = new Size(500, 974); |
| | | sidePanel1.Size = new Size(600, 974); |
| | | sidePanel1.TabIndex = 3; |
| | | sidePanel1.Text = "sidePanel1"; |
| | | // |
| | |
| | | singlePumpAnalyInfoCtrl1.Dock = DockStyle.Fill; |
| | | singlePumpAnalyInfoCtrl1.Location = new Point(1, 0); |
| | | singlePumpAnalyInfoCtrl1.Name = "singlePumpAnalyInfoCtrl1"; |
| | | singlePumpAnalyInfoCtrl1.Size = new Size(499, 974); |
| | | singlePumpAnalyInfoCtrl1.Size = new Size(599, 974); |
| | | singlePumpAnalyInfoCtrl1.TabIndex = 0; |
| | | // |
| | | // pumpVariableSpeedChart1 |
| | |
| | | pumpVariableSpeedChart1.LineVisible = false; |
| | | pumpVariableSpeedChart1.Location = new Point(0, 48); |
| | | pumpVariableSpeedChart1.Name = "pumpVariableSpeedChart1"; |
| | | pumpVariableSpeedChart1.Size = new Size(900, 974); |
| | | pumpVariableSpeedChart1.Size = new Size(800, 974); |
| | | pumpVariableSpeedChart1.TabIndex = 5; |
| | | // |
| | | // SinglePumpAnalyDlg |
| | |
| | | hydroValveInfo.UpdatePropStatus(nameof(hydroValveInfo.Diameter), hydroValvePropertyViewModel, nameof(hydroValvePropertyViewModel.Diameter)); |
| | | hydroValveInfo.MinorLoss = hydroValvePropertyViewModel.MinorLoss; |
| | | hydroValveInfo.UpdatePropStatus(nameof(hydroValveInfo.MinorLoss), hydroValvePropertyViewModel, nameof(hydroValvePropertyViewModel.MinorLoss)); |
| | | hydroValveInfo.ValveType = hydroValvePropertyViewModel.ValveType; |
| | | hydroValveInfo.ValveType = HydroValveTypeHelper.GetTypeCode(hydroValvePropertyViewModel.ValveType); |
| | | hydroValveInfo.UpdatePropStatus(nameof(hydroValveInfo.ValveType), hydroValvePropertyViewModel, nameof(hydroValvePropertyViewModel.ValveType)); |
| | | hydroValveInfo.ValveSetting = hydroValvePropertyViewModel.ValveSetting; |
| | | hydroValveInfo.UpdatePropStatus(nameof(hydroValveInfo.ValveSetting), hydroValvePropertyViewModel, nameof(hydroValvePropertyViewModel.ValveSetting)); |
| | |
| | | this.UpdatePropStatus(nameof(this.SpeedRatio), hydroPumpInfo, nameof(hydroPumpInfo.SpeedRatio)); |
| | | this.SpeedRatioPattern = hydroPumpInfo.SpeedRatioPattern; |
| | | this.UpdatePropStatus(nameof(this.SpeedRatioPattern), hydroPumpInfo, nameof(hydroPumpInfo.SpeedRatioPattern)); |
| | | this.Curve = string.IsNullOrEmpty(hydroPumpInfo.CurveQH) ? "æªé
ç½®" : "å·²é
ç½®"; |
| | | this.CurveQH = hydroPumpInfo.CurveQH; |
| | | this.UpdatePropStatus(nameof(this.CurveQH), hydroPumpInfo, nameof(hydroPumpInfo.CurveQH)); |
| | | this.CurveQP = hydroPumpInfo.CurveQP; |
| | |
| | | this.UpdatePropStatus(nameof(this.Diameter), rhs, nameof(rhs.Diameter)); |
| | | this.MinorLoss = rhs.MinorLoss; |
| | | this.UpdatePropStatus(nameof(this.MinorLoss), rhs, nameof(rhs.MinorLoss)); |
| | | this.ValveType = rhs.ValveType; |
| | | this.ValveType = HydroValveTypeHelper.GetTypeName(rhs.ValveType); |
| | | this.UpdatePropStatus(nameof(this.ValveType), rhs, nameof(rhs.ValveType)); |
| | | this.OpeningDegree = rhs.OpeningDegree; |
| | | this.UpdatePropStatus(nameof(this.OpeningDegree), rhs, nameof(rhs.OpeningDegree)); |
| | |
| | | this.UpdatePropStatus(nameof(this.Diameter), hydroValveInfo, nameof(hydroValveInfo.Diameter)); |
| | | this.MinorLoss = hydroValveInfo.MinorLoss; |
| | | this.UpdatePropStatus(nameof(this.MinorLoss), hydroValveInfo, nameof(hydroValveInfo.MinorLoss)); |
| | | this.ValveType = hydroValveInfo.ValveType; |
| | | this.ValveType = HydroValveTypeHelper.GetTypeName(hydroValveInfo.ValveType); |
| | | this.UpdatePropStatus(nameof(this.ValveType), hydroValveInfo, nameof(hydroValveInfo.ValveType)); |
| | | this.OpeningDegree = hydroValveInfo.OpeningDegree; |
| | | this.UpdatePropStatus(nameof(this.OpeningDegree), hydroValveInfo, nameof(hydroValveInfo.OpeningDegree)); |
| | |
| | | { |
| | | var list = new List<string> |
| | | { |
| | | ValveType.PRV, |
| | | ValveType.PSV, |
| | | ValveType.PBV, |
| | | ValveType.FCV, |
| | | ValveType.TCV, |
| | | ValveType.GPV |
| | | HydroValveTypeHelper.GetTypeName(Yw.Hydro.ValveType.PRV), |
| | | HydroValveTypeHelper.GetTypeName(Yw.Hydro.ValveType.PSV), |
| | | HydroValveTypeHelper.GetTypeName(Yw.Hydro.ValveType.PBV), |
| | | HydroValveTypeHelper.GetTypeName(Yw.Hydro.ValveType.FCV), |
| | | HydroValveTypeHelper.GetTypeName(Yw.Hydro.ValveType.TCV), |
| | | HydroValveTypeHelper.GetTypeName(Yw.Hydro.ValveType.GPV), |
| | | }; |
| | | return new StandardValuesCollection(list); |
| | | } |
| | |
| | | <ItemGroup> |
| | | <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> |
| | | <PackageReference Include="Yw.BLL.Basic.Core" Version="3.2.8" /> |
| | | <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.3.7" /> |
| | | <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.3.9" /> |
| | | </ItemGroup> |
| | | |
| | | <ItemGroup> |
| | |
| | | using DevExpress.XtraCharts; |
| | |  using DevExpress.XtraCharts; |
| | | |
| | | |
| | | namespace Yw.WinFrmUI.Phart |
| | |
| | | series.LegendTextPattern = Perform2dChartDisplay.AnnoTextQH; |
| | | if (series.View is SplineSeriesView view) |
| | | { |
| | | view.LineTensionPercent = 50; |
| | | view.MarkerVisibility = showMarker ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False; |
| | | view.LineStyle.DashStyle = DashStyle.Dash; |
| | | view.LineStyle.LineJoin = System.Drawing.Drawing2D.LineJoin.Miter; |
| | |
| | | series.LegendTextPattern = Perform2dChartDisplay.AnnoTextQL; |
| | | if (series.View is SplineSeriesView view) |
| | | { |
| | | view.LineTensionPercent = 50; |
| | | view.MarkerVisibility = showMarker ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False; |
| | | } |
| | | } |
| | |
| | | series.View.Color = Perform2dChartDisplay.CurveColorQE; |
| | | series.ArgumentScaleType = ScaleType.Numerical; |
| | | series.CrosshairEnabled = DevExpress.Utils.DefaultBoolean.False; |
| | | series.LegendTextPattern = Perform2dChartDisplay.AnnoTextQE; |
| | | series.LegendTextPattern = Perform2dChartDisplay.AnnoTextQE; |
| | | if (series.View is SplineSeriesView view) |
| | | { |
| | | view.LineTensionPercent = 50; |
| | | view.MarkerVisibility = showMarker ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False; |
| | | } |
| | | |
| | |
| | | series.LegendTextPattern = Perform2dChartDisplay.AnnoTextQP; |
| | | if (series.View is SplineSeriesView view) |
| | | { |
| | | view.LineTensionPercent = 50; |
| | | view.MarkerVisibility = showMarker ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False; |
| | | } |
| | | } |
| | |
| | | series2.Name = "SeriesCurveQE"; |
| | | series2.SeriesID = 1; |
| | | splineSeriesView2.AxisYName = "AxisYQE"; |
| | | splineSeriesView2.Color = Color.Green; |
| | | splineSeriesView2.Color = Color.Green; |
| | | series2.View = splineSeriesView2; |
| | | series3.Name = "SeriesCurveQP"; |
| | | series3.SeriesID = 2; |
| | |
| | | using DevExpress.Utils; |
| | | using DevExpress.Charts.Model; |
| | | using DevExpress.Utils; |
| | | using DevExpress.XtraCharts; |
| | | using DevExpress.XtraEditors; |
| | | using System.Drawing; |
| | | using System.Drawing.Drawing2D; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Windows.Forms; |
| | | using Yw.Geometry; |
| | | using static DevExpress.Utils.Drawing.Helpers.NativeMethods; |
| | | |
| | | namespace Yw.WinFrmUI.Phart |
| | | { |
| | |
| | | _series_qe = this.chartControl1.GetSeriesByName("SeriesCurveQE"); |
| | | _series_qe.SetCurveQEDisplay(); |
| | | |
| | | |
| | | _series_qp = this.chartControl1.GetSeriesByName("SeriesCurveQP"); |
| | | _series_qp.SetCurveQPDisplay(); |
| | | |
| | |
| | | |
| | | _series_qe_pt = this.chartControl1.GetSeriesByName("SeriesPointQE"); |
| | | _series_qe_pt.SetPointQEDisplay(); |
| | | |
| | | |
| | | _series_qp_pt = this.chartControl1.GetSeriesByName("SeriesPointQP"); |
| | | _series_qp_pt.SetPointQPDisplay(); |
| | |
| | | this.chartControl1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.chartControl1_MouseDown); |
| | | this.chartControl1.Resize += new System.EventHandler(this.chartControl1_Resize); |
| | | |
| | | // this.chartControl1.CustomPaint += ChartControl1_CustomPaint; |
| | | } |
| | | |
| | | private void ChartControl1_CustomPaint(object sender, CustomPaintEventArgs e) |
| | | { |
| | | if (!(e is DXCustomPaintEventArgs dxArgs)) |
| | | return; |
| | | |
| | | if (_qe == null) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | // 使ç¨Graphicsç»å¶æ ·æ¡çº¿ |
| | | using (var pen = new Pen(Color.Red, 2)) |
| | | { |
| | | // dxArgs.Cache.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; |
| | | |
| | | // å建GraphicsPath对象ï¼å¹¶æ·»å æ ·æ¡çº¿ |
| | | using (var path = new System.Drawing.Drawing2D.GraphicsPath()) |
| | | { |
| | | var pts = _qe.GetPointList().Select(x => new PointF((float)x.X, (float)x.Y)).ToArray(); |
| | | var g_pts = new List<PointF>(); |
| | | foreach (var pt in pts) |
| | | { |
| | | var x = pt.X; |
| | | var y = pt.Y; |
| | | var c_pt = _main_chart_diagram.DiagramToPoint(x, y, _axisXQ, _axis_y_qe); |
| | | g_pts.Add(new PointF(c_pt.Point.X, c_pt.Point.Y)); |
| | | } |
| | | |
| | | path.AddCurve(g_pts.ToArray()); |
| | | dxArgs.Cache.DrawPath(pen, path); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// åå§åå¾è¡¨æ°æ® |
| | |
| | | |
| | | if (qp != null) |
| | | qp_pt_list = qp.GetPointList(12); |
| | | SetBindingData(qh, qe, qp, qh_pt_list, qe_pt_list, qp_pt_list, null, null, null, coordinate_paras, calc_coordinate); |
| | | SetBindingData(qh, qe, qp, qh_pt_list, qe_pt_list, qp_pt_list, null, qe_pt_list, null, coordinate_paras, calc_coordinate); |
| | | } |
| | | |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | |
| | | _coordinate_paras = PumpCoordinate.CalcCoordinate(_qh_pt_list, _qe_pt_list, _qp_pt_list); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | if (_qe_pt_list != null && _qe_pt_list.Count > 3) |
| | | { |
| | | { |
| | | _series_qe.Visible = true; |
| | | _series_qe.Points.Clear(); |
| | | foreach (var pt in _qe_pt_list) |
| | |
| | | { |
| | | if (qre > 1.01 && qre < 1.8) |
| | | { |
| | | var ratio = _work_point.Q * qre / _qh_pt_list.Last().X; |
| | | var ex_q = _work_point.Q * qre; |
| | | var max_q = _qh_pt_list.Last().X; |
| | | var ratio = ex_q / max_q; |
| | | if (qre > 1.35) |
| | | { |
| | | var pointInfoQH2 = GetFitPointListByExtend(_qh_pt_list, ratio); |
| | |
| | | this.xtrPerform2dChart1.SetBindingData(qhCurve, qeCurve, qPCurve); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public List<Yw.Geometry.Point2d> GetFitPointListByExtend(List<Yw.Geometry.Point2d> points, double ratioExtend, int pointNumber = 20) |
| | | { |
| | |
| | | return default; |
| | | |
| | | var express = new Yw.Geometry.CubicSpline2d(points); |
| | | return express.GetPointListByXRatioRange(express.MinX, express.MaxX * ratioExtend, pointNumber); |
| | | return express.GetPointListByXRatioRange(1, ratioExtend); |
| | | } |
| | | |
| | | public double GetLineInsert(double X1, double X2, double Y1, double Y2, double X) |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public void Set(double flow, double head, double speed,double? eff, double level, bool is_sxp) |
| | | { |
| | | this.txtQ.EditValue = flow; |
| | | this.txtH.EditValue = head; |
| | | this.txtN.EditValue=speed; |
| | | this.txtE.EditValue = eff; |
| | | this.spinEditYLJS.EditValue= level; |
| | | this.checkEditSXB.Checked = is_sxp; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæ°æ® |
| | | /// </summary> |
| | |
| | | /// åè°äºä»¶ |
| | | /// </summary> |
| | | public event Func<string, Yw.Pump.CurveQH, Yw.Pump.CurveQE, Yw.Pump.CurveQP, Task<bool>> ReloadDataEvent; |
| | | |
| | | |
| | | public void Set(double flow, double head, double speed, double? eff, double level=1, bool is_sxp=true) |
| | | { |
| | | this.importCurveByOnePointCtrl1.Set(flow,head,speed, eff, level,is_sxp); |
| | | } |
| | | |
| | | //ç¡®å® |
| | | private async void btnOk_Click(object sender, EventArgs e) |
| | |
| | | #endregion |
| | | |
| | | #region 计ç®åæ |
| | | |
| | | |
| | | /// <summary> |
| | | /// 计ç®åæ |
| | | /// </summary> |
| | |
| | | CalcMinMaxValue(QH, QE, QP, ref maxQ, ref minQ, ref maxH, ref minH, ref maxE, ref minE, ref maxP, ref minP); |
| | | } |
| | | |
| | | return CalcCoordinate(minQ, maxQ, minH, maxH, minE, maxE, minP, maxP); |
| | | var calc_corrd = CalcCoordinate(minQ, maxQ, minH, maxH, minE, maxE, minP, maxP); |
| | | |
| | | #region ä¿®æ£Yè½´ |
| | | |
| | | var head_num_y = calc_corrd.EndLineNoH - calc_corrd.StartLineNoH; |
| | | var eff_num_y = calc_corrd.EndLineNoE - calc_corrd.StartLineNoE; |
| | | var power_num_y = calc_corrd.EndLineNoP - calc_corrd.StartLineNoP; |
| | | var sun_num_y = Math.Abs(head_num_y + eff_num_y + power_num_y); |
| | | if (sun_num_y < calc_corrd.GridNumberY) |
| | | { |
| | | calc_corrd.StartLineNoP = 1; |
| | | } |
| | | #endregion |
| | | |
| | | return calc_corrd; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | coordinate_paras.CoordMinP = GetByPlacesLength(disMaxP - (double)coordinate_paras.EndLineNoP * coordinate_paras.CoordSpaceP, 3); |
| | | |
| | | |
| | | if (minP > 0 && minP < 3) |
| | | { |
| | | coordinate_paras.StartLineNoP = 0; |
| | | //coordinate_paras.EndLineNoP = endLineNoP; |
| | | //coordinate_paras.CoordSpaceP = coordSpaceP; |
| | | coordinate_paras.CoordMinP = Math.Floor(minP); |
| | | } |
| | | //if (minP > 0 && minP < 3) |
| | | //{ |
| | | // coordinate_paras.StartLineNoP = 0; |
| | | // //coordinate_paras.EndLineNoP = endLineNoP; |
| | | // //coordinate_paras.CoordSpaceP = coordSpaceP; |
| | | // coordinate_paras.CoordMinP = Math.Floor(minP); |
| | | //} |
| | | } |
| | | |
| | | /// <summary> |