wbc
2025-11-13 03302e55e6a3c830ea310b1ec63e0e2e48985e2e
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
@@ -66,6 +66,7 @@
            btnGx.ItemClick += BtnGx_ItemClick;
            btnBaoGao.ItemClick += BtnBaoGao_ItemClick;
            btnTBPrint.ItemClick += BtnTBPrint_ItemClick;
            btnRefuse.ItemClick += BtnRefuse_ItemClick;
            var lst = new List<string>();
            foreach (BarItem item in barManager1.Items)
                if (item is BarLargeButtonItem largeButtonItem)
@@ -79,8 +80,49 @@
        }
        /// <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>
        ///     初始化按钮状态
        /// </summary>
@@ -211,6 +253,24 @@
            UserControl.ShowLogcs frm = new ShowLogcs(this.guidKey);
            frm.ShowDialog();
        }
        //拒签
        private void BtnRefuse_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (btnRefuseClick != null) btnRefuseClick(this, e);
            else
                return;
            /*     if (string.IsNullOrEmpty(guidKey))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UserControl.ShowLogcs frm = new ShowLogcs(this.guidKey);
            frm.ShowDialog();*/
        }
        private void BtnPiZhun_ItemClick(object sender, ItemClickEventArgs e)
        {
@@ -473,6 +533,7 @@
                lst.Add(btnGx.Name);
                lst.Add(btnBaoGao.Name);
                lst.Add(btnTBPrint.Name);
                lst.Add(btnRefuse.Name);
                _enabledBtn(lst);
                this.currentAction = "esc";
                if (btnEscClick != null) btnEscClick(this, e);
@@ -527,6 +588,8 @@
                    lst.Add(btnGx.Name);
                    lst.Add(btnBaoGao.Name);
                    lst.Add(btnTBPrint.Name);
                    lst.Add(btnRefuse.Name);
                    _enabledBtn(lst);
                }
            }
@@ -930,7 +993,10 @@
        /// </summary>
        public event EventHandler btnLogClick;
        /// <summary>
        ///   拒签
        /// </summary>
        public event EventHandler btnRefuseClick;
        /// <summary>
        ///   采购审核
        /// </summary>