From 0690da14b9781dbcc509f9c07652a0a15dc1d729 Mon Sep 17 00:00:00 2001
From: lg <999544862qq.com>
Date: 星期日, 15 九月 2024 13:17:35 +0800
Subject: [PATCH] 基础资料

---
 DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs |   37 ++++++++++++++++++++++++++++++++-----
 1 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs b/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs
index c6c5a7a..9fee2da 100644
--- a/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs
+++ b/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs
@@ -4,7 +4,10 @@
 using Gs.DevApp.ToolBox;
 using Newtonsoft.Json;
 using System;
+using System.Collections.Generic;
 using System.Data;
+using System.Reflection;
+using System.Windows.Forms;
 
 namespace Gs.DevApp.DevFrm.User
 {
@@ -19,7 +22,7 @@
             this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
             this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
             this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
-            // txt_category.TextChanged += Txt_category_TextChanged;
+            txt_category.TextChanged += Txt_category_TextChanged;
             tlMenu.MouseDoubleClick += TlMenu_MouseDoubleClick;
             getTree();
             getDownList();
@@ -33,7 +36,7 @@
         /// <param name="e"></param>
         private void Txt_category_TextChanged(object sender, EventArgs e)
         {
-            if (txt_category.SelectedIndex == 1)
+            if (txt_category.SelectedIndex ==1)
             {
                 this.txt_formPath.Enabled = true;
                 this.txt_icon.Enabled = true;
@@ -44,8 +47,6 @@
                 this.txt_icon.Enabled = false;
                 this.txt_formPath.Text = "";
                 this.txt_icon.Text = "";
-                MsgHelper.ShowError(txt_formPath.Enabled.ToString());
-                MsgHelper.ShowError(txt_icon.Enabled.ToString());
             }
         }
         /// <summary>
@@ -134,6 +135,16 @@
                 return;
             }
             getModel(rowGuid, true, 1);
+            if (txt_category.SelectedIndex == 1)
+            {
+                this.txt_formPath.Enabled = true;
+                this.txt_icon.Enabled = true;
+            }
+            else
+            {
+                this.txt_formPath.Enabled = false;
+                this.txt_icon.Enabled = false;
+            }
         }
         /// <summary>
         /// 鏂板浜嬩欢
@@ -208,6 +219,9 @@
             }
         }
 
+        /// <summary>
+        /// 璇诲彇鍒楄〃
+        /// </summary>
         private void getTree()
         {
             PageQueryModel pgq = new PageQueryModel(1, 999999, "idx", "asc", "", "");
@@ -262,7 +276,9 @@
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
         }
-
+        /// <summary>
+        /// 璇诲彇涓婄骇鏍�
+        /// </summary>
         private void getDownList()
         {
             PageQueryModel pgq = new PageQueryModel(1, 999999, "idx", "asc", "", " and category=1");
@@ -285,7 +301,18 @@
         }
         private void getActionList()
         {
+            List<string> lst = new List<string>();
+            lst = toolBarMenu1.actions;
             txt_name.Properties.Items.AddRange(toolBarMenu1.actions);
+            Assembly assembly = Assembly.GetExecutingAssembly();
+            Type[] types = assembly.GetTypes();
+            foreach (Type type in types)
+            {
+                if (type.IsSubclassOf(typeof(Form)))
+                {
+                    txt_formPath.Properties.Items.Add(type.FullName);
+                }
+            }
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3