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 | 107 +++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 98 insertions(+), 9 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs index 0062ab2..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; @@ -57,6 +59,11 @@ btnShouHouChk.ItemClick += BtnShouHouChk_ItemClick; btnShouHouFchk.ItemClick += BtnShouHouFchk_ItemClick; btnAll.ItemClick += BtnAll_ItemClick; + 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) @@ -65,7 +72,35 @@ actions = lst; } - + + + /// <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> /// 鍒濆鍖栨寜閽姸鎬� @@ -111,7 +146,7 @@ } return false; } - + private void BtnCaiGouFchk_ItemClick(object sender, ItemClickEventArgs e) { if (btnCaiGouFchkClick != null) @@ -146,7 +181,7 @@ if (btnShouHouChkClick != null) btnShouHouChkClick(this, e); } - + private void BtnFchk_ItemClick(object sender, ItemClickEventArgs e) { bool bl = _isCk(0); @@ -230,9 +265,10 @@ strType = xlsInService.Split('&')[1]; strService = xlsInService.Split('&')[0]; } - else { - strType = ""; - strService = xlsInService; + else + { + strType = ""; + strService = xlsInService; } //杩欐槸涓�涓殢鏈哄�硷紝灏嗕細琚綋浣滅埗浜瞘uid瀛樺埌file琛ㄤ腑锛屾湇鍔$鏍规嵁杩欎釜guid璇诲彇鐩稿簲鐨勬枃浠� string upGuid = Guid.NewGuid().ToString(); @@ -254,7 +290,7 @@ } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } }; frm.ShowDialog(); @@ -361,13 +397,34 @@ { if (btnQueryClick != null) btnQueryClick(this, e); } - + private void BtnAll_ItemClick(object sender, ItemClickEventArgs e) { if (btnAllClick != null) btnAllClick(this, e); } + private void BtnLianBan_ItemClick(object sender, ItemClickEventArgs e) + { + if (btnLianBanClick != null) + btnLianBanClick(this, e); + } + + private void BtnGongZi_ItemClick(object sender, ItemClickEventArgs e) + { + if (btnGongZiClick != null) + btnGongZiClick(this, e); + } + private void BtnGx_ItemClick(object sender, ItemClickEventArgs e) + { + if (btnGxClick != null) + btnGxClick(this, e); + } + private void BtnBaoGao_ItemClick(object sender, ItemClickEventArgs e) + { + if (btnBaoGaoClick != null) + btnBaoGaoClick(this, e); + } /// <summary> /// 鍙栨秷鏃讹紝杩樺師鎸夐挳鍙敤鎬� /// </summary> @@ -405,6 +462,11 @@ lst.Add(btnCaiGouFchk.Name); lst.Add(btnShouHouChk.Name); lst.Add(btnShouHouFchk.Name); + lst.Add(btnGongZi.Name); + lst.Add(btnLianBan.Name); + // lst.Add(btnEsc.Name); + lst.Add(btnGx.Name); + lst.Add(btnWeight.Name); _enabledBtn(lst); this.currentAction = "esc"; if (btnEscClick != null) btnEscClick(this, e); @@ -453,6 +515,11 @@ lst.Add(btnShouHouFchk.Name); lst.Add(btnIn.Name); lst.Add(btnOut.Name); + lst.Add(btnGongZi.Name); + lst.Add(btnLianBan.Name); + // lst.Add(btnEsc.Name); + lst.Add(btnGx.Name); + lst.Add(btnWeight.Name); _enabledBtn(lst); } } @@ -477,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); @@ -506,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); @@ -966,6 +1034,27 @@ /// 鎵归噺璁剧疆 /// </summary> public event EventHandler btnAllClick; + + /// <summary> + /// 杩炵彮璁剧疆 + /// </summary> + public event EventHandler btnLianBanClick; + + + /// <summary> + /// 璁$畻宸ヨ祫 + /// </summary> + public event EventHandler btnGongZiClick; + + /// <summary> + /// 宸ュ簭鍙樻洿 + /// </summary> + public event EventHandler btnGxClick; + + /// <summary> + /// 鐢熸垚鎶ュ憡 + /// </summary> + public event EventHandler btnBaoGaoClick; #endregion #region 鍏叡灞炴�� -- Gitblit v1.9.3