DevApp/Gs.DevApp/Gs.DevApp.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DevApp/Gs.DevApp/UserControl/UcDictionarySelect.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
DevApp/Gs.DevApp/UserControl/UcDictionarySelect.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -812,6 +812,12 @@ <Compile Include="DevFrm\Rpt\UcRptCgdhd.Designer.cs"> <DependentUpon>UcRptCgdhd.cs</DependentUpon> </Compile> <Compile Include="DevFrm\Rpt\UcRptCgdhdPrint.cs"> <SubType>UserControl</SubType> </Compile> <Compile Include="DevFrm\Rpt\UcRptCgdhdPrint.Designer.cs"> <DependentUpon>UcRptCgdhdPrint.cs</DependentUpon> </Compile> <Compile Include="DevFrm\Rpt\WomShjh.cs"> <SubType>Form</SubType> </Compile> DevApp/Gs.DevApp/UserControl/UcDictionarySelect.Designer.cs
@@ -40,6 +40,7 @@ // // tlMenu // this.tlMenu.Appearance.Row.Font = new System.Drawing.Font("Tahoma", 20F); this.tlMenu.Appearance.Row.Options.UseFont = true; this.tlMenu.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { this.tlcMenuName, @@ -63,6 +64,7 @@ this.tlcMenuName.FieldName = "defectName"; this.tlcMenuName.MinWidth = 16; this.tlcMenuName.Name = "tlcMenuName"; this.tlcMenuName.OptionsColumn.ReadOnly = true; this.tlcMenuName.Visible = true; this.tlcMenuName.VisibleIndex = 0; this.tlcMenuName.Width = 666; @@ -74,8 +76,7 @@ this.tlcActions.MaxWidth = 100; this.tlcActions.MinWidth = 23; this.tlcActions.Name = "tlcActions"; this.tlcActions.Visible = true; this.tlcActions.VisibleIndex = 1; this.tlcActions.OptionsColumn.ReadOnly = true; this.tlcActions.Width = 100; // // panel1 @@ -90,14 +91,14 @@ // // lbMsg // this.lbMsg.Appearance.Font = new System.Drawing.Font("Tahoma", 13F); this.lbMsg.Appearance.Font = new System.Drawing.Font("Tahoma", 20F); this.lbMsg.Appearance.ForeColor = System.Drawing.Color.Red; this.lbMsg.Appearance.Options.UseFont = true; this.lbMsg.Appearance.Options.UseForeColor = true; this.lbMsg.Dock = System.Windows.Forms.DockStyle.Fill; this.lbMsg.Location = new System.Drawing.Point(0, 0); this.lbMsg.Name = "lbMsg"; this.lbMsg.Size = new System.Drawing.Size(127, 27); this.lbMsg.Size = new System.Drawing.Size(191, 40); this.lbMsg.TabIndex = 6; this.lbMsg.Text = "labelControl1"; // DevApp/Gs.DevApp/UserControl/UcDictionarySelect.cs
@@ -6,6 +6,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Drawing; using System.Windows.Forms; @@ -16,7 +17,7 @@ private List<dynamic> lstCheckedKeyID = new List<dynamic>();//选择集合 string strTitle = ""; string strWhere = ""; public UcDictionarySelect(string _strTitle, string _strWhere,string _strMsg="") public UcDictionarySelect(string _strTitle, string _strWhere, string _strMsg = "") { InitializeComponent(); @@ -24,12 +25,27 @@ this.strTitle = _strTitle; this.strWhere = _strWhere; this.Text = _strTitle; tlMenu.MouseDown += (s, e) => { TreeListHitInfo hitInfo = tlMenu.CalcHitInfo(new Point(e.X, e.Y)); if (hitInfo.HitInfoType == HitInfoType.Cell) { TreeListNode node = hitInfo.Node; if (node != null) { if (node.HasChildren) // 只有当节点有子节点时才考虑展开或折叠 { if (node.Expanded) node.Collapse(); else node.Expand(); } } } }; getTree(); tlMenu.CustomDrawNodeCheckBox += TreeList1_CustomDrawNodeCheckBox; // tlMenu.OptionsBehavior.Editable = true; tlMenu.OptionsSelection.EnableAppearanceFocusedCell = false; // tlMenu.OptionsSelection.MultiSelect = true; // tlMenu.OptionsSelection.MultiSelectMode = TreeListMultiSelectMode.CellSelect; btnIn.Click += (s, e) => { findOrigin(tlMenu); @@ -41,7 +57,8 @@ dicCode = key.dicCode, dicTxt = key.dicTxt }); }; } ; UpdateParent?.Invoke(this, new UpdateParentEventArgs { DynamicList = list }); Close(); }; @@ -99,11 +116,11 @@ tlMenu.ParentFieldName = "pid"; tlMenu.Tag = "defectName"; tlMenu.EndUpdate(); this.tlMenu.CollapseAll(); // tlMenu.OptionsBehavior.Editable = true; tlMenu.OptionsBehavior.AllowRecursiveNodeChecking = false; tlMenu.BestFitColumns(); tlMenu.ExpandAll(); tlMenu.CollapseAll(); } catch (Exception ex) {