From 92c92d9bfb4431a8e2f4b8ac494547d50ea3a7f6 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 18 二月 2025 17:25:06 +0800
Subject: [PATCH] 板面
---
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs | 63 ++++++++++++++++++++++++-------
1 files changed, 48 insertions(+), 15 deletions(-)
diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
index 0b5e502..773b32d 100644
--- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
@@ -49,6 +49,7 @@
btnZhongTai.ItemClick += BtnbZhongTai_ItemClick;
btnWg.ItemClick += BtnWg_ItemClick;
btnHelp.ItemClick += BtnHelp_ItemClick;
+ btnLayout.ItemClick += BtnLayout_ItemClick;
var lst = new List<string>();
foreach (BarItem item in barManager1.Items)
if (item is BarLargeButtonItem largeButtonItem)
@@ -67,17 +68,36 @@
if (Parent != null) getNamespace();
}
- private bool _isCk() {
+ private bool _isCk(int _type)
+ {
Form parentForm = this.FindForm();
if (parentForm != null)
{
PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
- if (specificControl != null)
+ if (specificControl== null)
+ return false;
+ if (specificControl.Tag == null)
+ return false;
+ if (_type == 1)
{
- if (specificControl.Tag.ToString() == "宸插鏍�")
+ if (specificControl != null)
{
- Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹凡琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�");
- return true;
+ if (specificControl.Tag.ToString() == "宸插鏍�")
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹凡琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�");
+ return true;
+ }
+ }
+ }
+ if (_type == 0)
+ {
+ if (specificControl != null)
+ {
+ if (specificControl.Tag.ToString() == "鏈鏍�")
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹湭琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�");
+ return true;
+ }
}
}
}
@@ -190,6 +210,8 @@
private void BtnFchk_ItemClick(object sender, ItemClickEventArgs e)
{
+ bool bl = _isCk(0);
+ if (bl) return;
if (btnFChkClick != null)
{
btnFChkClick(this, e);
@@ -199,7 +221,7 @@
private void BtnChk_ItemClick(object sender, ItemClickEventArgs e)
{
- bool bl = _isCk();
+ bool bl = _isCk(1);
if (bl) return;
if (btnChkClick != null)
{
@@ -245,6 +267,8 @@
private void BtnFjianYan_ItemClick(object sender, ItemClickEventArgs e)
{
+ bool bl = _isCk(0);
+ if (bl) return;
if (btnFjianYanClick != null)
btnFjianYanClick(this, e);
else
@@ -268,7 +292,7 @@
private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e)
{
- bool bl = _isCk();
+ bool bl = _isCk(1);
if (bl) return;
if (btnJianYanClick != null)
btnJianYanClick(this, e);
@@ -459,6 +483,7 @@
lst.Add(btnLog.Name);
lst.Add(btnPiZhun.Name);
lst.Add(btnHelp.Name);
+ lst.Add(btnLayout.Name);
lst.Add(btnBoHui.Name);
lst.Add(btnTzbl.Name);
lst.Add(btnKg.Name);
@@ -500,6 +525,8 @@
lst.Add(btnWg.Name);
lst.Add(btnZhongTai.Name);
lst.Add(btnHelp.Name);
+ lst.Add(btnLayout.Name);
+ lst.Add(btnLoad.Name);
lst.Add(btnTzbl.Name);
_enabledBtn(lst);
}
@@ -517,24 +544,26 @@
private void BtnEdit_ItemClick(object sender, ItemClickEventArgs e)
{
- bool bl = _isCk();
+ bool bl = _isCk(1);
if (bl) return;
var lst = new List<string>();
lst.Add(btnSave.Name);
lst.Add(btnEsc.Name);
lst.Add(btnHelp.Name);
- lst.Add(btnLog.Name);
+ lst.Add(btnLayout.Name);
_enabledBtn(lst);
this.currentAction = "edit";
if (btnEdtClick != null) btnEdtClick(this, e);
-
}
private void BtnDel_ItemClick(object sender, ItemClickEventArgs e)
{
- bool bl = _isCk();
+ bool bl = _isCk(1);
if (bl) return;
if (btnDelClick != null) btnDelClick(this, e);
+
+ // btnEsc.Enabled = false;
+ this.currentAction = "";
}
/// <summary>
@@ -547,13 +576,14 @@
lst.Add(btnSave.Name);
lst.Add(btnEsc.Name);
lst.Add(btnHelp.Name);
+ lst.Add(btnLayout.Name);
_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();
+ PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
if (specificControl != null)
{
specificControl.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck;
@@ -619,10 +649,12 @@
return;
}
Gs.DevApp.ToolBox.MsgHelper.ShowInformation(_rtnJson.rtnMsg);
-
}
-
+ private void BtnLayout_ItemClick(object sender, ItemClickEventArgs e)
+ {
+ if (btnLayoutClick != null) btnLayoutClick(this, e);
+ }
private void _enabledBtn(List<string> lstBtn)
{
foreach (BarItem item in barManager1.Items)
@@ -656,7 +688,6 @@
var _obj = new
{
userGuid = LoginInfoModel.CurrentUser.LoginUserGuid,
- orgGuid = LoginInfoModel.CurrentUser.LoginOrgGuid,
formNamespace = _formNamespace
};
var strReturn = "";
@@ -942,6 +973,8 @@
public event EventHandler btnWgClick;
+ public event EventHandler btnLayoutClick;
+
#endregion
#region 鍏叡灞炴��
--
Gitblit v1.9.3