From f788e188fdeeb74cec845cd2c5df4976f7ff1ed5 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 18 四月 2025 15:57:14 +0800
Subject: [PATCH] 委外

---
 DevApp/Gs.DevApp/DevFrm/FrmMain.cs |   70 ++++++++++++++++++++++++-----------
 1 files changed, 48 insertions(+), 22 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/FrmMain.cs b/DevApp/Gs.DevApp/DevFrm/FrmMain.cs
index 5804dc2..8736984 100644
--- a/DevApp/Gs.DevApp/DevFrm/FrmMain.cs
+++ b/DevApp/Gs.DevApp/DevFrm/FrmMain.cs
@@ -1,4 +1,14 @@
-锘縰sing System;
+锘縰sing DevExpress.XtraBars;
+using DevExpress.XtraBars.FluentDesignSystem;
+using DevExpress.XtraBars.Navigation;
+using DevExpress.XtraTab;
+using DevExpress.XtraTab.ViewInfo;
+using Gs.DevApp.DevFrm.User;
+using Gs.DevApp.Entity;
+using Gs.DevApp.ToolBox;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Configuration;
@@ -6,17 +16,6 @@
 using System.Drawing;
 using System.Reflection;
 using System.Windows.Forms;
-using DevExpress.XtraBars;
-using DevExpress.XtraBars.FluentDesignSystem;
-using DevExpress.XtraBars.Navigation;
-using DevExpress.XtraTab;
-using DevExpress.XtraTab.ViewInfo;
-using Gs.DevApp.DevFrm.Sys;
-using Gs.DevApp.DevFrm.User;
-using Gs.DevApp.Entity;
-using Gs.DevApp.ToolBox;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
 
 namespace Gs.DevApp.DevFrm
 {
@@ -95,24 +94,26 @@
                     MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
                 }
             };
+            barMenu.ItemClick += (s, e) =>
+            {
+                Gs.DevApp.DevFrm.User.SysMenu frm = new SysMenu();
+                frm.ShowDialog();
+            };
+            //  tab.ContextMenuStrip = cms1;
         }
 
         private void Tab_MouseDown(object sender, MouseEventArgs e)
         {
             if (e.Button == MouseButtons.Right)
             {
-                tab.ContextMenuStrip = null;
-                //TreeListHitInfo hInfo = treeList1.CalcHitInfo(new Point(e.X, e.Y));
-                //TreeListNode node = hInfo.Node;
-                //treeList1.FocusedNode = node;
-                tab.ContextMenuStrip = cms1;
+                cms1.Show(tab, e.Location);
             }
         }
 
         private void BarEasy_ItemClick(object sender, ItemClickEventArgs e)
         {
-            var frm = new EasyCode();
-            frm.ShowDialog();
+            //var frm = new EasyCode();
+            //frm.ShowDialog();
         }
 
         private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
@@ -185,7 +186,11 @@
             {
                 var strJson = UtilityHelper.HttpPost("",
                     "User/GetUserLoginInfo", JsonConvert.SerializeObject(_obj));
-                DevExpress.Utils.WaitDialogForm wdf = new DevExpress.Utils.WaitDialogForm("鎷煎懡鍔犺浇涓紝璇风◢鍚�......", "鍙嬫儏鎻愮ず");
+                Size _size; string _caption; Color _color; Padding _pad;
+                (_size, _caption, _color, _pad) = Gs.DevApp.ToolBox.UtilityHelper.getLoading();
+                DevExpress.Utils.WaitDialogForm wdf = new DevExpress.Utils.WaitDialogForm("鍔犺浇杩涘害:", _caption, _size);
+                wdf.BackColor = _color;
+                wdf.Padding = _pad;
                 var _job = JObject.Parse(strJson);
                 var rtnCode = _job["rtnCode"].ToString();
                 if (int.Parse(rtnCode) > 0)
@@ -220,6 +225,8 @@
                         foreach (var _dy2 in drItem)
                         {
                             var _itm = acrd.AddItem();
+                            _itm.Appearance.Hovered.Options.UseFont = true;
+                            _itm.Appearance.Normal.Options.UseFont = true;
                             _itm.ImageOptions.Image =
                                 UtilityHelper.GetImgFromResource(
                                     _dy2["icon"].ToString(), 2);
@@ -227,8 +234,6 @@
                             _itm.Style = ElementStyle.Item;
                             _itm.Text = _dy2["name"].ToString();
                             wdf.SetCaption("鍔犺浇杩涘害:" + _dy2["name"].ToString());
-                            _itm.Appearance.Normal.Font =
-                                new Font("Tahoma", 10F);
                             _itm.Tag = _dy2["formPath"].ToString(); //瀛樿矾寰勶紝绫诲悕
                             _itm.Click += _grp_Click;
                             _grp.Elements.Add(_itm);
@@ -378,6 +383,14 @@
                 newForm.ControlBox = false;
                 newForm.Dock = DockStyle.Fill;
                 newForm.Visible = true;
+                //瀹炵幇瀛愮獥浣撶殑濮旀墭beg
+                EventInfo evt = newForm.GetType().GetEvent("UpdateParent",
+                    BindingFlags.NonPublic | BindingFlags.Instance
+                    | BindingFlags.Public
+                );
+                if (evt != null)
+                    evt.AddEventHandler(newForm, new EventHandler<UpdateParentEventArgs>(UpdateParent_OnChange));
+                //瀹炵幇瀛愮獥浣撶殑濮旀墭end
                 return newForm;
             }
             catch (Exception)
@@ -387,6 +400,19 @@
 
             return null;
         }
+        //瀹炵幇瀛愮獥浣撶殑濮旀墭beg
+        private void UpdateParent_OnChange(object sender, UpdateParentEventArgs e)
+        {
+            List<string> _val = e.StringList;
+            MsgHelper.ShowError(_val[0]);
+            var tabPageName = _val + "_page";
+            var tabText = ""; //褰撳墠閫夐」鍗¢〉Text鏍囬
+            var newFormName = "Gs.DevApp.DevFrm.Frm_MesInvItemOut_SCLL"; //瀛樿矾寰勶紝绫诲悕
+            Image imgIcon = null;
+            AddTabpage(tab, tabPageName, tabText,
+                newFormName, imgIcon);
+        }
+        //瀹炵幇瀛愮獥浣撶殑濮旀墭end
         private int _userOut()
         {
             var _obj = new

--
Gitblit v1.9.3