From e0b138b3e057de6f57021e6c8963868f5c5acc5a Mon Sep 17 00:00:00 2001 From: tx <123456> Date: 星期二, 22 四月 2025 11:07:06 +0800 Subject: [PATCH] 大改 --- TProduct.WinFrmUI/TProduct.WinFrmUI.TPump/InfoDlg/PartInfoCtrl.cs | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/TProduct.WinFrmUI/TProduct.WinFrmUI.TPump/InfoDlg/PartInfoCtrl.cs b/TProduct.WinFrmUI/TProduct.WinFrmUI.TPump/InfoDlg/PartInfoCtrl.cs index 5a01ff2..bd742c2 100644 --- a/TProduct.WinFrmUI/TProduct.WinFrmUI.TPump/InfoDlg/PartInfoCtrl.cs +++ b/TProduct.WinFrmUI/TProduct.WinFrmUI.TPump/InfoDlg/PartInfoCtrl.cs @@ -42,7 +42,10 @@ ) { if (part == null || pump == null) - return; + { + SetEmptyPump(); return; + } + this._pump = pump; this._pumpPart = part; @@ -167,6 +170,14 @@ } } + private void SetEmptyPump() + { + layoutControlGroup2.Enabled = false; + bbi淇敼娉靛弬鏁�.Enabled = false; + bbi淇敼鐢垫満鍙傛暟.Enabled= false; + bbi淇敼鐢垫祦姣�.Enabled = false; + + } private void btnGaochaView_Click(object sender, EventArgs e) { var HelpDlg = new TProduct.WinFrmUI.Data4Factory.NpshGaoChaHelpDlg(); @@ -175,8 +186,9 @@ } public Action< TProduct.Model.PrjItemElectricInfo> OnChangeElectricInfo = null; public Action<TProduct.Model.ProductMainExMotor > OnChangeMotorInfo = null; - public Action<string> OnChangePumpInfo = null; + public Action<string> OnChangeRatedParas = null; public Action OnEditMore = null; + public Action OnChangePump = null; private void bbi淇敼鐢垫満鍙傛暟_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (this._currentMotor != null) @@ -310,9 +322,9 @@ #endregion - if (OnChangePumpInfo != null) + if (OnChangeRatedParas != null) { - OnChangePumpInfo(_ratedParasPump.ToJson()); + OnChangeRatedParas(_ratedParasPump.ToJson()); } MessageBox.Show("宸蹭慨鏀�"); @@ -468,8 +480,7 @@ } private void bbi淇敼鐢垫祦姣擾ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) - { - + { if (this._currenEleInfo != null) { int v = 0; @@ -486,5 +497,11 @@ MessageBox.Show("宸蹭慨鏀�"); } + + private void bbiOnChangePump_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if(OnChangePump != null) + OnChangePump.Invoke(); + } } } -- Gitblit v1.9.3