| | |
| | | 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 |
| | | { |
| | |
| | | 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(); |
| | |
| | | /// <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; |
| | |
| | | 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> |
| | |
| | | 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> |
| | | /// 新增事件 |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读取列表 |
| | | /// </summary> |
| | | private void getTree() |
| | | { |
| | | PageQueryModel pgq = new PageQueryModel(1, 999999, "idx", "asc", "", ""); |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读取上级树 |
| | | /// </summary> |
| | | private void getDownList() |
| | | { |
| | | PageQueryModel pgq = new PageQueryModel(1, 999999, "idx", "asc", "", " and category=1"); |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |