From aa7cb331d6a76f3b11d2ac042916b35a29d6ebd8 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期四, 25 九月 2025 16:00:58 +0800
Subject: [PATCH] 调拨加上限制
---
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs | 56 +++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 49 insertions(+), 7 deletions(-)
diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
index b6bd2cc..8a055ea 100644
--- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
@@ -3,6 +3,7 @@
using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraLayout;
+using DevExpress.XtraRichEdit.Model;
using DevExpress.XtraWaitForm;
using Gs.DevApp.DevFrm;
using Gs.DevApp.DevFrm.QC;
@@ -67,7 +68,6 @@
btnBaoGao.ItemClick += BtnBaoGao_ItemClick;
btnPingZhi.ItemClick += BtnPingZhi_ItemClick;
btnFPingZhi.ItemClick += BtnFPingZhi_ItemClick;
-
var lst = new List<string>();
foreach (BarItem item in barManager1.Items)
if (item is BarLargeButtonItem largeButtonItem)
@@ -76,7 +76,7 @@
actions = lst;
}
-
+
/// <summary>
/// 鍒濆鍖栨寜閽姸鎬�
@@ -202,7 +202,10 @@
MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
- UserControl.ShowLogcs frm = new ShowLogcs(this.guidKey);
+ bool b = false;
+ if (this.Parent.Text == "鎺ㄩ�佹姤琛�")
+ b = true;
+ UserControl.ShowLogcs frm = new ShowLogcs(this.guidKey, b);
frm.ShowDialog();
}
@@ -770,7 +773,6 @@
// continue;
// }
//}
-
//鎸夐挳鏄惁鍦ㄦ潈闄愯〃涓�
var exists = dt.AsEnumerable().Any(row =>
row.Field<string>("name") == item.Caption);
@@ -784,7 +786,6 @@
_enabledList.Add(_btnName);
}
}
-
//榛樿鍚敤鐨勬寜閽�
_enabledList.Add(btnLoad.Name);
_enabledList.Add(btnHelp.Name);
@@ -1049,7 +1050,7 @@
/// 鍙嶅搧璐�
/// </summary>
public event EventHandler btnFPingZhiClick;
-
+
#endregion
#region 鍏叡灞炴��
@@ -1095,6 +1096,47 @@
#endregion
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="inType"></param>
+ public void SetAllButton(int inType)
+ {
+ var lstBtn = new List<string>();
+ if (inType == 0)
+ {
+ lstBtn.Add(btnSave.Name);
+ lstBtn.Add(btnEsc.Name);
+ foreach (BarItem item in barManager1.Items)
+ if (item is BarLargeButtonItem largeButtonItem)
+ {
+ if (!lstBtn.Contains(item.Name))
+ largeButtonItem.Enabled = true;
+ else
+ largeButtonItem.Enabled = false;
+ }
+ return;
+ }
+ if (inType == 2)
+ {
+ lstBtn.Add(btnHelp.Name);
+ lstBtn.Add(btnLoad.Name);
+ lstBtn.Add(btnQuery.Name);
+ lstBtn.Add(btnLayout.Name);
+ lstBtn.Add(btnFont.Name);
+ lstBtn.Add(btnAdd.Name);
+ foreach (BarItem item in barManager1.Items)
+ if (item is BarLargeButtonItem largeButtonItem)
+ {
+ if (lstBtn.Contains(item.Name))
+ largeButtonItem.Enabled = true;
+ else
+ largeButtonItem.Enabled = false;
+ }
+ return;
+ }
+
+ }
/// <summary>
/// 鏌ユ壘gridView
@@ -1303,6 +1345,6 @@
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
-
+
}
}
\ No newline at end of file
--
Gitblit v1.9.3