From 4f5d0ddf7702fa491d3a7cb97f2e3c2604826b01 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 07 二月 2025 09:32:19 +0800 Subject: [PATCH] 细节 --- DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs | 92 ++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 84 insertions(+), 8 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs index f4c7c84..f01da9c 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); @@ -226,6 +262,8 @@ private void BtnFjianYan_ItemClick(object sender, ItemClickEventArgs e) { + bool bl = _isCk(0); + if (bl) return; if (btnFjianYanClick != null) btnFjianYanClick(this, e); else @@ -249,6 +287,8 @@ private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e) { + bool bl = _isCk(1); + if (bl) return; if (btnJianYanClick != null) btnJianYanClick(this, e); else @@ -276,7 +316,7 @@ //_ckService(1.ToString()); } - private async void BtnIn_ItemClick(object sender, ItemClickEventArgs e) + private async void BtnIn_ItemClick(object sender, ItemClickEventArgs e) { if (string.IsNullOrEmpty(xlsInService)) { @@ -416,7 +456,7 @@ { if (btnQueryClick != null) btnQueryClick(this, e); } - + private void BtnEsc_ItemClick(object sender, ItemClickEventArgs e) { if (MsgHelper.AskQuestion("纭畾瑕佽鍙栨秷鍚�?")) @@ -438,6 +478,7 @@ lst.Add(btnLog.Name); lst.Add(btnPiZhun.Name); lst.Add(btnHelp.Name); + lst.Add(btnBoHui.Name); _enabledBtn(lst); this.currentAction = "esc"; if (btnEscClick != null) btnEscClick(this, e); @@ -457,6 +498,24 @@ lst.Add(btnAdd.Name); lst.Add(btnEdit.Name); lst.Add(btnEsc.Name); + lst.Add(btnChk.Name); + lst.Add(btnFchk.Name); + lst.Add(btnDel.Name); + lst.Add(btnJianYan.Name); + lst.Add(btnFjianYan.Name); + lst.Add(btnQuery.Name); + lst.Add(btnLog.Name); + lst.Add(btnZhiLiangChk.Name); + lst.Add(btnZhiLiangFchk.Name); + lst.Add(btnPiZhun.Name); + lst.Add(btnBoHui.Name); + lst.Add(btnDesign.Name); + lst.Add(btnReport.Name); + lst.Add(btnKg.Name); + lst.Add(btnWg.Name); + lst.Add(btnZhongTai.Name); + lst.Add(btnHelp.Name); + lst.Add(btnLoad.Name); _enabledBtn(lst); } } @@ -473,6 +532,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); @@ -480,11 +541,17 @@ _enabledBtn(lst); this.currentAction = "edit"; if (btnEdtClick != null) btnEdtClick(this, e); + } 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> @@ -500,6 +567,16 @@ _enabledBtn(lst); this.currentAction = "add"; if (btnAddClick != null) btnAddClick(this, e); + Form parentForm = this.FindForm(); + if (parentForm != null) + { + PictureBox specificControl =(PictureBox) parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); + if (specificControl != null) + { + specificControl.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck; + specificControl.Tag = "鏈鏍�"; + } + } } private void BtnRole_ItemClick(object sender, ItemClickEventArgs e) @@ -516,7 +593,7 @@ if (btnWgClick != null) btnWgClick(this, e); } - + private void BtnbZhongTai_ItemClick(object sender, ItemClickEventArgs e) { @@ -596,7 +673,6 @@ var _obj = new { userGuid = LoginInfoModel.CurrentUser.LoginUserGuid, - orgGuid = LoginInfoModel.CurrentUser.LoginOrgGuid, formNamespace = _formNamespace }; var strReturn = ""; @@ -735,7 +811,7 @@ } return false; } - + #region 鍏叡浜嬩欢 @@ -870,18 +946,18 @@ /// 閫氱煡澶囨枡 /// </summary> public event EventHandler btnTzblClick; - + /// <summary> /// 鐘舵�� /// </summary> public event EventHandler btnZhongTaiClick; - + /// <summary> /// 鎵嬪姩瀹屽伐 /// </summary> public event EventHandler btnWgClick; - + #endregion #region 鍏叡灞炴�� -- Gitblit v1.9.3