From 2bbfc173c71bdd549a42bf31eee81b9432c2dbed Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期二, 29 十月 2024 21:30:30 +0800 Subject: [PATCH] 优化计算控件 --- WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/02-main/EditThreeLinkMainDlg.cs | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/02-main/EditThreeLinkMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/02-main/EditThreeLinkMainDlg.cs index 9661ed1..0b2c8a1 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/02-main/EditThreeLinkMainDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/06-threeLink/02-main/EditThreeLinkMainDlg.cs @@ -3,17 +3,17 @@ namespace HStation.WinFrmUI.Assets { - public partial class EditThreeLinkMainDlg : DevExpress.XtraEditors.XtraForm + public partial class EditAssetsThreelinkMainDlg : DevExpress.XtraEditors.XtraForm { - public EditThreeLinkMainDlg() + public EditAssetsThreelinkMainDlg() { InitializeComponent(); this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; } - private Vmo.ThreeLinkMainVmo _ThreeLinkVmo = null; + private Vmo.AssetsThreelinkMainVmo _ThreeLinkVmo = null; - public async void SetBindingData(Vmo.ThreeLinkMainVmo ThreeLinkVmo) + public async void SetBindingData(Vmo.AssetsThreelinkMainVmo ThreeLinkVmo) { _ThreeLinkVmo = ThreeLinkVmo; var allCaliber = await new Yw.BLL.SysDictData().GetByTypeCode("1"); @@ -50,13 +50,15 @@ { TextEditMaterial.EditValue = _ThreeLinkVmo.MaterialName.ToString(); } + this.textEditRunThroughCoefficient.Text = _ThreeLinkVmo.RunThroughCoefficient.ToString(); + this.textEditBranchThroughCoefficient.Text = _ThreeLinkVmo.BranchThroughCoefficient.ToString(); this.TextEditName.Text = _ThreeLinkVmo.Name; this.DescriptionTextEdit.Text = _ThreeLinkVmo.Description; this.TextEditCoefficient.Text = _ThreeLinkVmo.Coefficient.ToString(); this.TextEditKeyWorld.Text = _ThreeLinkVmo.KeyWord; } - public event Func<Vmo.ThreeLinkMainVmo, Task<bool>> ReloadDataEvent = null; + public event Func<Vmo.AssetsThreelinkMainVmo, Task<bool>> ReloadDataEvent = null; //鏁版嵁楠岃瘉 private bool Valid() @@ -91,6 +93,14 @@ { _ThreeLinkVmo.Caliber = null; } + if (double.TryParse(textEditRunThroughCoefficient.Text, out double runThrough)) + { + _ThreeLinkVmo.Coefficient = runThrough; + } + if (double.TryParse(textEditBranchThroughCoefficient.Text, out double branchThough)) + { + _ThreeLinkVmo.Coefficient = branchThough; + } if (await this.ReloadDataEvent.Invoke(_ThreeLinkVmo)) { TipFormHelper.ShowSucceed("淇敼鎴愬姛!"); -- Gitblit v1.9.3