iqc
lu
2025-04-17 41c36661d58cd788d5c51326d7fe2da9c248d7c0
DevApp/Gs.DevApp/DevFrm/FrmMain.cs
@@ -1,4 +1,14 @@
using System;
using 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,18 +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.XtraReports.Expressions.Native;
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
{
@@ -101,7 +99,7 @@
                Gs.DevApp.DevFrm.User.SysMenu frm = new SysMenu();
                frm.ShowDialog();
            };
          //  tab.ContextMenuStrip = cms1;
            //  tab.ContextMenuStrip = cms1;
        }
        private void Tab_MouseDown(object sender, MouseEventArgs e)
@@ -188,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)
@@ -381,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)
@@ -390,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