From ab354260b4b9ca8cf1aa12573310ec2a9598e084 Mon Sep 17 00:00:00 2001
From: lg <999544862qq.com>
Date: 星期五, 20 九月 2024 22:04:35 +0800
Subject: [PATCH] 库位设置
---
DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 54 insertions(+), 5 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs b/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs
index c6c5a7a..81f995e 100644
--- a/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs
+++ b/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs
@@ -1,10 +1,14 @@
-锘縰sing DevExpress.XtraTreeList;
+锘縰sing DevExpress.XtraEditors.Controls;
+using DevExpress.XtraTreeList;
using DevExpress.XtraTreeList.Nodes;
using Gs.DevApp.Entity;
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,11 +23,32 @@
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();
getActionList();
+ txt_upGuid.Properties.PopupFormSize = new System.Drawing.Size(txt_upGuid.Width, 300);
+ txt_upGuid.Properties.ImmediatePopup = true;
+ txt_upGuid.Properties.TextEditStyle = TextEditStyles.Standard;
+ txt_upGuid.Properties.TreeList.IndicatorWidth = 50;
+ txt_upGuid.Properties.TreeList.CustomDrawNodeIndicator += (s, ee) =>
+ {
+ if (ee.IsNodeIndicator)
+ {
+ var index = ee.Node.TreeList.GetVisibleIndexByNode(ee.Node);
+ ee.Info.DisplayText = (index + 1).ToString();
+ }
+ };
+ tlMenu.IndicatorWidth = 50;
+ tlMenu.CustomDrawNodeIndicator += (s, ee) =>
+ {
+ if (ee.IsNodeIndicator)
+ {
+ var index = ee.Node.TreeList.GetVisibleIndexByNode(ee.Node);
+ ee.Info.DisplayText = (index + 1).ToString();
+ }
+ };
}
/// <summary>
@@ -44,8 +69,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 +157,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 +241,9 @@
}
}
+ /// <summary>
+ /// 璇诲彇鍒楄〃
+ /// </summary>
private void getTree()
{
PageQueryModel pgq = new PageQueryModel(1, 999999, "idx", "asc", "", "");
@@ -262,7 +298,9 @@
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
-
+ /// <summary>
+ /// 璇诲彇涓婄骇鏍�
+ /// </summary>
private void getDownList()
{
PageQueryModel pgq = new PageQueryModel(1, 999999, "idx", "asc", "", " and category=1");
@@ -285,7 +323,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