Hydro/HStation.Hydro.Core/TransferHelper.cs
@@ -409,7 +409,7 @@ pump.StartCode = revitPump.StartCode; pump.EndCode = revitPump.EndCode; pump.LinkStatus = revitPump.LinkStatus; pump.RatedPower = revitPump.RatedPower; pump.RatedP = revitPump.RatedPower; pump.CurveQH = revitPump.CurveQH; pump.Price = revitPump.Price; pump.PricePattern = revitPump.PricePattern; Hydro/Yw.Hydro.Core/ParseHelper.cs
@@ -325,7 +325,7 @@ pumpModel.StartNode = allNodes.Find(x => x.Id == pump.StartCode); pumpModel.EndNode = allNodes.Find(x => x.Id == pump.EndCode); pumpModel.LinkStatus = pump.LinkStatus; pumpModel.RatedPower = pump.RatedPower; pumpModel.RatedPower = pump.RatedP; pumpModel.CurveQH = pump.CurveQH; if (string.IsNullOrEmpty(pumpModel.CurveQH)) { Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj
@@ -7,7 +7,7 @@ </PropertyGroup> <ItemGroup> <PackageReference Include="Yw.Service.Hydro.Core" Version="3.3.2" /> <PackageReference Include="Yw.Service.Hydro.Core" Version="3.3.6" /> </ItemGroup> <ItemGroup> WinFrmUI/HStation.WinFrmUI.Hydro.Core/01-model/HydroModelMgrPage.cs
@@ -18,9 +18,9 @@ InitializeComponent(); } protected override void ViewModel(Yw.Dto.HydroModelDto dto) protected override void ViewModel(Yw.Vmo.HydroModelVmo vmo) { base.ViewModel(dto); base.ViewModel(vmo); var guid = new PageGuid() { Modular = "Hydro", @@ -30,7 +30,7 @@ if (!IsExistPage(guid, true)) { var page = new HydroQ3dViewPage(); page.SetBindingData(dto.ID); page.SetBindingData(vmo.ID); CreatePage(page, guid); } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs
@@ -206,7 +206,7 @@ feedBackMsg?.Invoke("æ£å¨å ³èæ°´åç»ææ¨¡å...", Color.Black); var hydroRelation = new Yw.Dto.AddHydroModelRelationInput(); var hydroRelation = new Yw.Vmo.HydroModelRelationVmo(); hydroRelation.ObjectType = HStation.Xhs.DataType.XhsProjectSite; hydroRelation.ObjectID = projectSiteId; hydroRelation.ModelID = hydroId; @@ -214,7 +214,7 @@ hydroRelation.Content = null; hydroRelation.Description = null; var bllHydroRelation = new Yw.BLL.HydroModelRelation(); var bllHydroRelation = BLLFactory<Yw.BLL.HydroModelRelation>.Instance; var hydroRelationId = await bllHydroRelation.Insert(hydroRelation); if (hydroRelationId < 1) { WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/00-core/ImportXhsProjectFileHelper.cs
@@ -117,7 +117,7 @@ feedBackMsg?.Invoke("æ£å¨å ³èæ°´åç»ææ¨¡å...", Color.Black); var hydroRelation = new Yw.Dto.AddHydroModelRelationInput(); var hydroRelation = new Yw.Vmo.HydroModelRelationVmo(); hydroRelation.ObjectType = HStation.Xhs.DataType.XhsProjectSite; hydroRelation.ObjectID = projectSiteId; hydroRelation.ModelID = hydroId; @@ -125,8 +125,9 @@ hydroRelation.Content = null; hydroRelation.Description = null; var bllHydroRelation = new Yw.BLL.HydroModelRelation(); var hydroRelationId = await bllHydroRelation.Insert(hydroRelation); var hydroRelationId = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance.Insert(hydroRelation); if (hydroRelationId < 1) { feedBackMsg?.Invoke("å ³èæ°´åç»ææ¨¡å失败ï¼ï¼ï¼", Color.Red); WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/HydroCurve.cs
@@ -11,6 +11,11 @@ public const string PumpQH = "PumpQH"; /// <summary> /// æ°´æ³µæµéåçæ²çº¿ /// </summary> public const string PumpQP = "PumpQP"; /// <summary> /// æ°´æ³µæµéæçæ²çº¿ /// </summary> public const string PumpQE = "PumpQE"; WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/AddHydroSceneDlg.Designer.cs
@@ -147,6 +147,8 @@ // // Root // Root.AppearanceItemCaption.Options.UseTextOptions = true; Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, emptySpaceItem1, layoutControlItem2, layoutControlItem3, layoutControlItem5, layoutControlItem6, layoutControlItem7, layoutControlItem4 }); WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/AddHydroSceneDlg.cs
@@ -1,4 +1,7 @@ namespace Yw.WinFrmUI using DevExpress.XtraEditors; using DevExpress.XtraTabbedMdi; namespace Yw.WinFrmUI { public partial class AddHydroSceneDlg : DevExpress.XtraEditors.XtraForm { @@ -11,18 +14,20 @@ /// <summary> /// éè½½æ°æ®äºä»¶ /// </summary> public event Action<long> ReloadDataEvent; public event Action<Yw.Vmo.HydroSceneVmo> ReloadDataEvent; private Lazy<Yw.BLL.SysFlagStd> _bllFlag = new(() => new Yw.BLL.SysFlagStd());//æ ç¾bll private Lazy<Yw.BLL.HydroScene> _bllScene = new(() => new Yw.BLL.HydroScene());//åºæ¯bll private Yw.Vmo.HydroSceneVmo _vmo = null; /// <summary> /// ç»å®æ°æ® /// </summary> public async void SetBindingData() public async Task SetBindingData() { var allFlagList = await _bllFlag.Value.GetFlagListBySysType(Yw.Hydro.DataType.HydroScene); this.setFlagsEditCtrl1.SetBindingData(allFlagList, null); _vmo = new HydroSceneVmo(); var allFlagList = await BLLFactory<Yw.BLL.SysFlag>.Instance.GetBySysType(Yw.Hydro.DataType.HydroScene); var allFlagNameList = allFlagList?.Select(x => x.Name).Distinct().ToList(); this.setFlagsEditCtrl1.SetBindingData(allFlagNameList, null); } //éªè¯ @@ -40,7 +45,7 @@ this.dxErrorProvider1.SetError(this.txtCode, "å¿ å¡«é¡¹"); return false; } if (await _bllScene.Value.IsExistCode(code)) if (await BLLFactory<Yw.BLL.HydroScene>.Instance.IsExistCode(code)) { this.dxErrorProvider1.SetError(this.txtCode, "ç¼ç å·²åå¨"); return false; @@ -48,7 +53,7 @@ var tagName = this.txtTagName.Text.Trim(); if (!string.IsNullOrEmpty(tagName)) { if (await _bllScene.Value.IsExistTagName(tagName)) if (await BLLFactory<Yw.BLL.HydroScene>.Instance.IsExistTagName(tagName)) { this.dxErrorProvider1.SetError(this.txtTagName, "æ å¿å·²åå¨"); return false; @@ -64,21 +69,22 @@ { return; } var model = new Yw.Dto.AddHydroSceneInput(); model.Name = this.txtName.Text.Trim(); model.Code = this.txtCode.Text.Trim(); model.Flags = this.setFlagsEditCtrl1.SelectedFlagList; model.TagName = this.txtTagName.Text.Trim(); model.Description = this.txtDescription.Text.Trim(); _vmo.Name = this.txtName.Text.Trim(); _vmo.Code = this.txtCode.Text.Trim(); _vmo.Flags = this.setFlagsEditCtrl1.SelectedFlagList; _vmo.TagName = this.txtTagName.Text.Trim(); _vmo.Description = this.txtDescription.Text.Trim(); var id = await _bllScene.Value.Insert(model); var id = await BLLFactory<Yw.BLL.HydroScene>.Instance.Insert(_vmo); if (id < 1) { MessageBoxHelper.ShowWarning("æ·»å 失败ï¼"); XtraMessageBox.Show("æ·»å 失败ï¼"); return; } var vmo = await BLLFactory<Yw.BLL.HydroScene>.Instance.GetByID(id); this.ReloadDataEvent?.Invoke(vmo); this.ReloadDataEvent?.Invoke(id); TipFormHelper.ShowSucceed("æ·»å æå"); this.DialogResult = DialogResult.OK; this.Close(); WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/HydroSceneMgrPage.cs
@@ -60,7 +60,7 @@ } //æ·»å private void Add() private async void Add() { if (_allBindingList == null) { @@ -73,14 +73,12 @@ { WaitFormHelper.HideWaitForm(); }; dlg.SetBindingData(); dlg.ReloadDataEvent += async (id) => await dlg.SetBindingData(); dlg.ReloadDataEvent += async (vmo) => { var model = await _bll.Value.GetByID(id); var vm = new HydroSceneMgrViewModel(model); var vm = new HydroSceneMgrViewModel(vmo); _allBindingList.Add(vm); this.hydroSceneMgrViewModelBindingSource.ResetBindings(false); TipFormHelper.ShowSucceed("æ·»å æåï¼"); }; dlg.ShowDialog(); } WinFrmUI/Yw.WinFrmUI.Hydro.Core/01-scene/HydroSceneMgrViewModel.cs
@@ -13,7 +13,7 @@ /// <summary> /// /// </summary> public HydroSceneMgrViewModel(Yw.Dto.HydroSceneDto rhs) public HydroSceneMgrViewModel(Yw.Vmo.HydroSceneVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; @@ -22,7 +22,7 @@ this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Dto = rhs; this.Vmo = rhs; } /// <summary> @@ -68,9 +68,9 @@ public string Description { get; set; } /// <summary> /// Dto /// Vmo /// </summary> [Display(Name = "Dto")] public Yw.Dto.HydroSceneDto Dto { get; set; } [Display(Name = "Vmo")] public Yw.Vmo.HydroSceneVmo Vmo { get; set; } } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/02-model/HydroModelMgrPage.cs
@@ -1,6 +1,4 @@ using DevExpress.CodeParser; using DevExpress.Utils.About; using DevExpress.XtraEditors; using DevExpress.XtraEditors; using Yw.EPAnet; using Yw.WinFrmUI.Page; @@ -25,29 +23,25 @@ /// <summary> /// æ¥ç模åäºä»¶ /// </summary> public event Action<Yw.Dto.HydroModelDto> ViewModelEvent; public event Action<HydroModelVmo> ViewModelEvent; /// <summary> /// è®¡ç®æ¨¡åäºä»¶ /// </summary> public event Action<Yw.Dto.HydroModelDto> CalcuModelEvent; public event Action<HydroModelVmo> CalcuModelEvent; /// <summary> /// æ ¡éªæ¨¡åäºä»¶ /// </summary> public event Action<Yw.Dto.HydroModelDto> ValidModelEvent; public event Action<HydroModelVmo> ValidModelEvent; private List<HydroModelMgrViewModel> _allBindingList = null; private Lazy<Yw.BLL.HydroModel> _bll = new(() => new Yw.BLL.HydroModel()); private Lazy<Yw.BLL.HydroModelRelation> _bllRelation = new(() => new Yw.BLL.HydroModelRelation()); //å è½½æ°æ® private async Task LoadData() { var allBindingList = await _bll.Value.GetAll(); var allBindingRelationList = await _bllRelation.Value.GetAll(); var allBindingList = await BLLFactory<Yw.BLL.HydroModel>.Instance.GetAll(); var allBindingRelationList = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance.GetAll(); _allBindingList = new List<HydroModelMgrViewModel>(); if (allBindingList != null && allBindingList.Count > 0) { @@ -83,9 +77,9 @@ /// <summary> /// æ¥ç模å /// </summary> protected virtual async void ViewModel(Yw.Dto.HydroModelDto dto) protected virtual async void ViewModel(HydroModelVmo vmo) { var info = await new Yw.BLL.HydroModelInfo().GetByID(dto.ID); var info = await new Yw.BLL.HydroModelInfo().GetByID(vmo.ID); var guid = new PageGuid() { Modular = "Hydro", @@ -104,9 +98,9 @@ /// <summary> /// è®¡ç®æ¨¡å /// </summary> protected virtual async void CalcuModel(Yw.Dto.HydroModelDto dto) protected virtual async void CalcuModel(HydroModelVmo vmo) { var info = await new Yw.BLL.HydroModelInfo().GetByID(dto.ID); var info = await new Yw.BLL.HydroModelInfo().GetByID(vmo.ID); var netWork = Yw.Hydro.ParseHelper.ToNetwork(info); var list = netWork.Calcu(); XtraMessageBox.Show(JsonHelper.Object2FormatJson(list)); @@ -115,9 +109,9 @@ /// <summary> /// æ ¡éªæ¨¡å /// </summary> protected virtual async void ValidModel(Yw.Dto.HydroModelDto dto) protected virtual async void ValidModel(HydroModelVmo vmo) { var info = await new Yw.BLL.HydroModelInfo().GetByID(dto.ID); var info = await new Yw.BLL.HydroModelInfo().GetByID(vmo.ID); var netWork = Yw.Hydro.ParseHelper.ToNetwork(info); var result = netWork.Check(); XtraMessageBox.Show(JsonHelper.Object2FormatJson(result)); @@ -184,8 +178,8 @@ { return; } ViewModel(vm.Dto); this.ViewModelEvent?.Invoke(vm.Dto); ViewModel(vm.Vmo); this.ViewModelEvent?.Invoke(vm.Vmo); } //模åè®¡ç® @@ -196,8 +190,8 @@ { return; } CalcuModel(vm.Dto); this.CalcuModelEvent?.Invoke(vm.Dto); CalcuModel(vm.Vmo); this.CalcuModelEvent?.Invoke(vm.Vmo); } @@ -209,8 +203,8 @@ { return; } ValidModel(vm.Dto); this.ValidModelEvent?.Invoke(vm.Dto); ValidModel(vm.Vmo); this.ValidModelEvent?.Invoke(vm.Vmo); } //导åºinp WinFrmUI/Yw.WinFrmUI.Hydro.Core/02-model/HydroModelMgrViewModel.cs
@@ -13,32 +13,34 @@ /// <summary> /// /// </summary> public HydroModelMgrViewModel(Yw.Dto.HydroModelDto rhs, bool hasRelation) public HydroModelMgrViewModel(HydroModelVmo rhs, bool hasRelation) { this.ID = rhs.ID; this.Name = rhs.Name; this.Code = rhs.Code; this.Content = rhs.Content; this.FlagsString = Yw.Untity.FlagsHelper.ToString(rhs.Flags); this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Dto = rhs; this.Vmo = rhs; this.HasRelation = hasRelation; } /// <summary> /// /// </summary> public void Reset(Yw.Dto.HydroModelDto rhs) public void Reset(HydroModelVmo rhs) { this.ID = rhs.ID; this.Name = rhs.Name; this.Code = rhs.Code; this.Content = rhs.Content; this.FlagsString = Yw.Untity.FlagsHelper.ToString(rhs.Flags); this.TagName = rhs.TagName; this.SortCode = rhs.SortCode; this.Description = rhs.Description; this.Dto = rhs; this.Vmo = rhs; } /// <summary> @@ -58,6 +60,12 @@ /// </summary> [Display(Name = "ç¼ç ")] public string Code { get; set; } /// <summary> /// å 容 /// </summary> [Display(Name = "å 容")] public string Content { get; set; } /// <summary> /// æ ç¾ @@ -84,10 +92,10 @@ public string Description { get; set; } /// <summary> /// Dto /// Vmo /// </summary> [Display(Name = "Dto")] public Yw.Dto.HydroModelDto Dto { get; set; } [Display(Name = "Vmo")] public HydroModelVmo Vmo { get; set; } /// <summary> /// WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/00-core/HydroParterInfoUpdateExtensions.cs
@@ -1,4 +1,6 @@ namespace Yw.WinFrmUI using DevExpress.CodeParser; namespace Yw.WinFrmUI { /// <summary> /// @@ -26,6 +28,8 @@ rhs.Name = propertyViewModel.Name; rhs.Code = propertyViewModel.Code; rhs.ModelType = propertyViewModel.ModelType; rhs.DbId = propertyViewModel.DbId; rhs.DbLocked = propertyViewModel.DbLocked; rhs.Flags = propertyViewModel.Flags?.ToList(); rhs.Description = propertyViewModel.Description; @@ -86,6 +90,16 @@ hydroJunctionInfo.Elev = hydroJunctionPropertyViewModel.Elev; hydroJunctionInfo.Demand = hydroJunctionPropertyViewModel.Demand; hydroJunctionInfo.DemandPattern = hydroJunctionPropertyViewModel.DemandPattern; } } //è¿æ¥ä»¶ if (rhs is Yw.Model.HydroConnectInfo hydroConnectInfo) { if (propertyViewModel is HydroConnectPropertyViewModel hydroConnectPropertyViewModel) { hydroConnectInfo.Material = hydroConnectPropertyViewModel.Material; hydroConnectInfo.Caliber = hydroConnectPropertyViewModel.Caliber; hydroConnectInfo.MinorLoss = hydroConnectPropertyViewModel.MinorLoss; } } //æ©æ£å¨ @@ -211,13 +225,18 @@ { if (propertyViewModel is HydroPumpPropertyViewModel hydroPumpPropertyViewModel) { hydroPumpInfo.RatedPower = hydroPumpPropertyViewModel.RatedPower; hydroPumpInfo.RatedQ = hydroPumpPropertyViewModel.RatedP; hydroPumpInfo.RatedQ = hydroPumpPropertyViewModel.RatedQ; hydroPumpInfo.RatedH = hydroPumpPropertyViewModel.RatedH; hydroPumpInfo.RatedN = hydroPumpPropertyViewModel.RatedN; hydroPumpInfo.CurveQH = hydroPumpPropertyViewModel.CurveQH; hydroPumpInfo.CurveQP = hydroPumpPropertyViewModel.CurveQP; hydroPumpInfo.CurveQE = hydroPumpPropertyViewModel.CurveQE; hydroPumpInfo.SpeedRatio = hydroPumpPropertyViewModel.SpeedRatio; hydroPumpInfo.SpeedRatioPattern = hydroPumpPropertyViewModel.SpeedRatioPattern; hydroPumpInfo.Price = hydroPumpPropertyViewModel.Price; hydroPumpInfo.PricePattern = hydroPumpPropertyViewModel.PricePattern; hydroPumpInfo.CurveQE = hydroPumpPropertyViewModel.CurveQE; } } //éé¨ WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/00-core/HydroParterPropertyViewModel.cs
@@ -84,11 +84,20 @@ public string DbId { get; set; } /// <summary> /// éå® /// </summary> [Category("åºç¡ä¿¡æ¯")] [DisplayName("éå®")] [PropertyOrder(7)] [Browsable(true)] public bool DbLocked { get; set; } /// <summary> /// æ ç¾ /// </summary> [Category("åºç¡ä¿¡æ¯")] [DisplayName("æ ç¾")] [PropertyOrder(7)] [PropertyOrder(8)] [Browsable(true)] public List<string> Flags { get; set; } @@ -97,7 +106,7 @@ /// </summary> [Category("åºç¡ä¿¡æ¯")] [DisplayName("说æ")] [PropertyOrder(8)] [PropertyOrder(9)] [MultiText] [Browsable(true)] public string Description { get; set; } @@ -114,6 +123,8 @@ this.Name = rhs.Name; this.Code = rhs.Code; this.ModelType = rhs.ModelType; this.DbId = rhs.DbId; this.DbLocked = rhs.DbLocked; this.Flags = rhs.Flags?.ToList(); this.Description = rhs.Description; } WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroConnectPropertyViewModel.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,70 @@ using Yw.Model; namespace Yw.WinFrmUI { /// <summary> /// è¿æ¥ä»¶å±æ§è§å¾ /// </summary> public class HydroConnectPropertyViewModel : HydroJunctionPropertyViewModel { /// <summary> /// /// </summary> public HydroConnectPropertyViewModel() { } /// <summary> /// /// </summary> public HydroConnectPropertyViewModel(Yw.Model.HydroConnectInfo rhs) : base(rhs) { this.Material = rhs.Material; this.Caliber = rhs.Caliber; this.MinorLoss = rhs.MinorLoss; } /// <summary> /// ææ /// </summary> [Category("æ°æ®")] [DisplayName("ææ")] [PropertyOrder(31)] [Browsable(true)] public string Material { get; set; } /// <summary> /// å£å¾ /// </summary> [Category("æ°æ®")] [DisplayName("å£å¾")] [PropertyOrder(32)] [Browsable(true)] public string Caliber { get; set; } /// <summary> /// å±é»ç³»æ° /// </summary> [Category("æ°æ®")] [DisplayName("å±é»ç³»æ°")] [PropertyOrder(33)] [Browsable(true)] public double? MinorLoss { get; set; } /// <summary> /// æ´æ°å±æ§ /// </summary> /// <param name="rhs"></param> /// <param name="allParterList"></param> public override void UpdateProperty(HydroParterInfo rhs, List<HydroParterInfo> allParterList) { base.UpdateProperty(rhs, allParterList); if (rhs is Yw.Model.HydroConnectInfo hydroConnectInfo) { this.Material = hydroConnectInfo.Material; this.Caliber = hydroConnectInfo.Caliber; this.MinorLoss = hydroConnectInfo.MinorLoss; } } } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroElbowPropertyViewModel.cs
@@ -3,7 +3,7 @@ /// <summary> /// 弝头屿§è§å¾ /// </summary> public class HydroElbowPropertyViewModel : HydroJunctionPropertyViewModel public class HydroElbowPropertyViewModel : HydroConnectPropertyViewModel { /// <summary> /// WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroFourlinkPropertyViewModel.cs
@@ -3,7 +3,7 @@ /// <summary> /// åé屿§è§å¾ /// </summary> public class HydroFourlinkPropertyViewModel : HydroJunctionPropertyViewModel public class HydroFourlinkPropertyViewModel : HydroConnectPropertyViewModel { /// <summary> /// WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/02-node/03-junction/HydroThreelinkPropertyViewModel.cs
@@ -3,7 +3,7 @@ /// <summary> /// ä¸é屿§è§å¾ /// </summary> public class HydroThreelinkPropertyViewModel : HydroJunctionPropertyViewModel public class HydroThreelinkPropertyViewModel : HydroConnectPropertyViewModel { /// <summary> /// WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/03-link/02-pump/HydroPumpPropertyViewModel.cs
@@ -17,13 +17,17 @@ /// </summary> public HydroPumpPropertyViewModel(Yw.Model.HydroPumpInfo rhs) : base(rhs) { this.RatedPower = rhs.RatedPower; this.RatedP = rhs.RatedP; this.RatedQ = rhs.RatedQ; this.RatedH = rhs.RatedH; this.RatedN = rhs.RatedN; this.CurveQH = rhs.CurveQH; this.CurveQP = rhs.CurveQP; this.CurveQE = rhs.CurveQE; this.SpeedRatio = rhs.SpeedRatio; this.SpeedRatioPattern = rhs.SpeedRatioPattern; this.Price = rhs.Price; this.PricePattern = rhs.PricePattern; this.CurveQE = rhs.CurveQE; } @@ -43,53 +47,55 @@ [DisplayName("é¢å®åç")] [PropertyOrder(101)] [Browsable(true)] public double RatedPower { get; set; } public double RatedP { get; set; } /// <summary> /// é¢å®æµé /// </summary> [Category("æ°æ®")] [DisplayName("é¢å®æµé")] [PropertyOrder(102)] [Browsable(true)] public double? RatedQ { get; set; } /// <summary> /// é¢å®æ¬ç¨ /// </summary> [Category("æ°æ®")] [DisplayName("é¢å®æ¬ç¨")] [PropertyOrder(103)] [Browsable(true)] public double? RatedH { get; set; } /// <summary> /// é¢å®è½¬é /// </summary> [Category("æ°æ®")] [DisplayName("é¢å®è½¬é")] [PropertyOrder(104)] [Browsable(true)] public double? RatedN { get; set; } /// <summary> /// æµéæ¬ç¨æ²çº¿ /// </summary> [Category("æ°æ®")] [DisplayName("æµéæ¬ç¨æ²çº¿")] [PropertyOrder(102)] [PropertyOrder(105)] [IsHydroCurvePro(HydroCurve.PumpQH)] [Browsable(true)] public string CurveQH { get; set; } /// <summary> /// è½¬éæ¯ /// æµéåçæ²çº¿ /// </summary> [Category("æ°æ®")] [DisplayName("è½¬éæ¯")] [PropertyOrder(103)] [Browsable(true)] public double? SpeedRatio { get; set; } /// <summary> /// è½¬éæ¯æ¨¡å¼ /// </summary> [Category("æ°æ®")] [DisplayName("è½¬éæ¯æ¨¡å¼")] [PropertyOrder(104)] [Browsable(true)] public string SpeedRatioPattern { get; set; } /// <summary> /// è½èä»·æ ¼ /// </summary> [Category("æ°æ®")] [DisplayName("è½èä»·æ ¼")] [PropertyOrder(105)] [Browsable(true)] public double? Price { get; set; } /// <summary> /// ä»·æ ¼æ¨¡å¼ /// </summary> [Category("æ°æ®")] [DisplayName("ä»·æ ¼æ¨¡å¼")] [DisplayName("æµéåçæ²çº¿")] [PropertyOrder(106)] [IsHydroCurvePro(HydroCurve.PumpQP)] [Browsable(true)] public string PricePattern { get; set; } public string CurveQP { get; set; } /// <summary> /// æµéæçæ²çº¿ @@ -102,6 +108,44 @@ public string CurveQE { get; set; } /// <summary> /// è½¬éæ¯ /// </summary> [Category("æ°æ®")] [DisplayName("è½¬éæ¯")] [PropertyOrder(108)] [Browsable(true)] public double? SpeedRatio { get; set; } /// <summary> /// è½¬éæ¯æ¨¡å¼ /// </summary> [Category("æ°æ®")] [DisplayName("è½¬éæ¯æ¨¡å¼")] [PropertyOrder(109)] [Browsable(true)] public string SpeedRatioPattern { get; set; } /// <summary> /// è½èä»·æ ¼ /// </summary> [Category("æ°æ®")] [DisplayName("è½èä»·æ ¼")] [PropertyOrder(110)] [Browsable(true)] public double? Price { get; set; } /// <summary> /// ä»·æ ¼æ¨¡å¼ /// </summary> [Category("æ°æ®")] [DisplayName("ä»·æ ¼æ¨¡å¼")] [PropertyOrder(111)] [Browsable(true)] public string PricePattern { get; set; } /// <summary> /// æ´æ°å±æ§ /// </summary> /// <param name="rhs"></param> @@ -111,13 +155,17 @@ base.UpdateProperty(rhs, allParterList); if (rhs is Yw.Model.HydroPumpInfo hydroPumpInfo) { this.RatedPower = hydroPumpInfo.RatedPower; this.RatedP = hydroPumpInfo.RatedP; this.RatedQ = hydroPumpInfo.RatedQ; this.RatedH = hydroPumpInfo.RatedH; this.RatedN = hydroPumpInfo.RatedN; this.CurveQH = hydroPumpInfo.CurveQH; this.CurveQP = hydroPumpInfo.CurveQP; this.CurveQE = hydroPumpInfo.CurveQE; this.SpeedRatio = hydroPumpInfo.SpeedRatio; this.SpeedRatioPattern = hydroPumpInfo.SpeedRatioPattern; this.Price = hydroPumpInfo.Price; this.PricePattern = hydroPumpInfo.PricePattern; this.CurveQE = hydroPumpInfo.CurveQE; } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-q3d/HydroQ3dViewPage.cs
@@ -1,15 +1,4 @@ using 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 Yw.WinFrmUI namespace Yw.WinFrmUI { public partial class HydroQ3dViewPage : Yw.WinFrmUI.DocumentPage { @@ -19,21 +8,19 @@ this.PageTitle.Caption = "æ°´åæ¨¡å"; } private Yw.Model.HydroModelInfo _hydroInfo = null; /// <summary> /// ç»å®æ°æ® /// </summary> /// <param name="hydroModelId">æ°´åæ¨¡åid</param> public async void SetBindingData(Yw.Model.HydroModelInfo rhs) public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo) { this.PageTitle.Caption = $"{rhs.Name}\r\næ°´åæ¨¡å"; if (hydroInfo == null) { return; } _hydroInfo = hydroInfo; var netWork = HydroQ3dTransferHelper.ToNetworkViewModel(rhs); this.drawer1.SetData(netWork); //var temp = new Template(); //temp.network = netWork; //mapViewer1.SetData(temp); } /// <summary> @@ -42,6 +29,14 @@ public override void InitialDataSource() { base.InitialDataSource(); if (_hydroInfo == null) { return; } this.PageTitle.Caption = $"{_hydroInfo.Name}\r\næ°´åæ¨¡å"; var netWork = HydroQ3dTransferHelper.ToNetworkViewModel(_hydroInfo); this.drawer1.SetData(netWork); } } } WinFrmUI/Yw.WinFrmUI.Hydro.Core/GlobalUsings.cs
@@ -4,3 +4,4 @@ global using Yw.WinFrmUI; global using System.ComponentModel; global using System.ComponentModel.DataAnnotations; global using Yw.Vmo; WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj
@@ -9,8 +9,8 @@ <ItemGroup> <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> <PackageReference Include="Yw.BLL.Basic.Core" Version="3.2.6" /> <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.2.0" /> <PackageReference Include="Yw.BLL.Basic.Core" Version="3.2.7" /> <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.2.1" /> </ItemGroup> <ItemGroup>