From ce701f953bd952bf8303ccb93520a8a3af33860e Mon Sep 17 00:00:00 2001 From: lu <123456> Date: 星期四, 21 八月 2025 13:45:42 +0800 Subject: [PATCH] iqc称重 --- DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs | 51 +++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 47 insertions(+), 4 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs index a010583..26e02be 100644 --- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs +++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs @@ -3,8 +3,10 @@ using DevExpress.XtraGrid; using DevExpress.XtraGrid.Views.Grid; using DevExpress.XtraLayout; +using Gs.DevApp.DevFrm.QC; using Gs.DevApp.DevFrm.Rpt; using Gs.DevApp.DevFrm.Sys; +using Gs.DevApp.DevFrm.Work; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Newtonsoft.Json; @@ -60,6 +62,8 @@ btnGongZi.ItemClick += BtnGongZi_ItemClick; btnLianBan.ItemClick += BtnLianBan_ItemClick; btnGx.ItemClick += BtnGx_ItemClick; + btnWeight.ItemClick += BtnWeight_ItemClick; + btnBaoGao.ItemClick += BtnBaoGao_ItemClick; var lst = new List<string>(); foreach (BarItem item in barManager1.Items) if (item is BarLargeButtonItem largeButtonItem) @@ -69,6 +73,34 @@ } + + /// <summary> + /// 鍚姩绉伴噸 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + /// <exception cref="NotImplementedException"></exception> + private void BtnWeight_ItemClick(object sender, ItemClickEventArgs e) + { + bool isOpen = false; + foreach (Form form in Application.OpenForms) + { + if (form is WeightIqc) + { + isOpen = true; + //form.Activate(); // 婵�娲诲凡瀛樺湪鐨勭獥浣� + //form.MaximizeBox = true; + //form.TopMost = true; + MsgHelper.ShowInformation("宸茬粡鎵撳紑浜嗭紝璇峰嬁閲嶅鎵撳紑锛�"); + break; + } + } + if (!isOpen) + { + var form = new WeightIqc(); + form.Show(); + } + } /// <summary> /// 鍒濆鍖栨寜閽姸鎬� @@ -388,7 +420,11 @@ if (btnGxClick != null) btnGxClick(this, e); } - + private void BtnBaoGao_ItemClick(object sender, ItemClickEventArgs e) + { + if (btnBaoGaoClick != null) + btnBaoGaoClick(this, e); + } /// <summary> /// 鍙栨秷鏃讹紝杩樺師鎸夐挳鍙敤鎬� /// </summary> @@ -428,8 +464,9 @@ lst.Add(btnShouHouFchk.Name); lst.Add(btnGongZi.Name); lst.Add(btnLianBan.Name); - lst.Add(btnEsc.Name); + // lst.Add(btnEsc.Name); lst.Add(btnGx.Name); + lst.Add(btnWeight.Name); _enabledBtn(lst); this.currentAction = "esc"; if (btnEscClick != null) btnEscClick(this, e); @@ -480,8 +517,9 @@ lst.Add(btnOut.Name); lst.Add(btnGongZi.Name); lst.Add(btnLianBan.Name); - lst.Add(btnEsc.Name); + // lst.Add(btnEsc.Name); lst.Add(btnGx.Name); + lst.Add(btnWeight.Name); _enabledBtn(lst); } } @@ -506,8 +544,8 @@ lst.Add(btnHelp.Name); lst.Add(btnLayout.Name); lst.Add(btnFont.Name); - lst.Add(btnFont.Name); lst.Add(btnLog.Name); + lst.Add(btnWeight.Name); _enabledBtn(lst); this.currentAction = "edit"; if (btnEdtClick != null) btnEdtClick(this, e); @@ -535,6 +573,7 @@ lst.Add(btnHelp.Name); lst.Add(btnLayout.Name); lst.Add(btnFont.Name); + lst.Add(btnWeight.Name); _enabledBtn(lst); this.currentAction = "add"; if (btnAddClick != null) btnAddClick(this, e); @@ -1012,6 +1051,10 @@ /// </summary> public event EventHandler btnGxClick; + /// <summary> + /// 鐢熸垚鎶ュ憡 + /// </summary> + public event EventHandler btnBaoGaoClick; #endregion #region 鍏叡灞炴�� -- Gitblit v1.9.3