From 3fb5533f30f178dcdf5965a41c39fb62c61da4d8 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 06 二月 2025 17:15:47 +0800 Subject: [PATCH] 细节 --- DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs | 63 +++++++++++++++++++++++++------ 1 files changed, 51 insertions(+), 12 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs index b971c8b..d6b0c51 100644 --- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs +++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs @@ -67,6 +67,38 @@ if (Parent != null) getNamespace(); } + private bool _isCk(int _type) { + Form parentForm = this.FindForm(); + if (parentForm != null) + { + if (_type == 1) + { + PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); + if (specificControl != null) + { + if (specificControl.Tag.ToString() == "宸插鏍�") + { + Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹凡琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�"); + return true; + } + } + } + if (_type == 0) + { + PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); + if (specificControl != null) + { + if (specificControl.Tag.ToString() == "鏈鏍�") + { + Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹湭琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�"); + return true; + } + } + } + } + return false; + } + private void BtnBoHui_ItemClick(object sender, ItemClickEventArgs e) { if (btnBoHuiClick != null) @@ -173,6 +205,8 @@ private void BtnFchk_ItemClick(object sender, ItemClickEventArgs e) { + bool bl = _isCk(0); + if (bl) return; if (btnFChkClick != null) { btnFChkClick(this, e); @@ -182,6 +216,8 @@ private void BtnChk_ItemClick(object sender, ItemClickEventArgs e) { + bool bl = _isCk(1); + if (bl) return; if (btnChkClick != null) { btnChkClick(this, e); @@ -249,6 +285,8 @@ private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e) { + bool bl = _isCk(1); + if (bl) return; if (btnJianYanClick != null) btnJianYanClick(this, e); else @@ -474,6 +512,8 @@ lst.Add(btnKg.Name); lst.Add(btnWg.Name); lst.Add(btnZhongTai.Name); + lst.Add(btnHelp.Name); + lst.Add(btnLoad.Name); _enabledBtn(lst); } } @@ -490,6 +530,8 @@ private void BtnEdit_ItemClick(object sender, ItemClickEventArgs e) { + bool bl = _isCk(1); + if (bl) return; var lst = new List<string>(); lst.Add(btnSave.Name); lst.Add(btnEsc.Name); @@ -497,20 +539,17 @@ _enabledBtn(lst); this.currentAction = "edit"; if (btnEdtClick != null) btnEdtClick(this, e); - Form parentForm = this.FindForm(); - if (parentForm != null) - { - Control specificControl = parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); - if (specificControl != null) - { - specificControl.Visible = false; - } - } + } private void BtnDel_ItemClick(object sender, ItemClickEventArgs e) { + bool bl = _isCk(1); + if (bl) return; if (btnDelClick != null) btnDelClick(this, e); + + // btnEsc.Enabled = false; + this.currentAction = ""; } /// <summary> @@ -529,10 +568,11 @@ Form parentForm = this.FindForm(); if (parentForm != null) { - Control specificControl = parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); + PictureBox specificControl =(PictureBox) parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); if (specificControl != null) { - specificControl.Visible = false; + specificControl.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck; + specificControl.Tag = "鏈鏍�"; } } } @@ -631,7 +671,6 @@ var _obj = new { userGuid = LoginInfoModel.CurrentUser.LoginUserGuid, - orgGuid = LoginInfoModel.CurrentUser.LoginOrgGuid, formNamespace = _formNamespace }; var strReturn = ""; -- Gitblit v1.9.3