From b46e9f1c0dd78053d469fb09530be60f63bc17c8 Mon Sep 17 00:00:00 2001 From: tdx Date: Fri, 21 Feb 2025 06:52:01 +0000 Subject: [PATCH] SVN r279 SVN-Revision: r279 --- .../AutoGridLookUp/AutoGridLookUp.Designer.cs | 59 -------- .../AutoGridLookUp/AutoGridLookUp.cs | 81 +++-------- .../AutoGridLookUp/AutoGridLookUp.resx | 126 ------------------ .../AutoGridRevLookUp.Designer.cs | 47 ------- .../AutoGridLookUp/AutoGridRevLookUp.cs | 56 +------- .../AutoGridLookUp/AutoGridRevLookUp.resx | 126 ------------------ .../AutoTreeLookUp/AutoTreeLookUp.Designer.cs | 36 ----- .../AutoTreeLookUp/AutoTreeLookUp.cs | 9 +- 8 files changed, 27 insertions(+), 513 deletions(-) delete mode 100644 插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.Designer.cs delete mode 100644 插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.resx delete mode 100644 插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.Designer.cs delete mode 100644 插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.resx delete mode 100644 插件库/Lskj.Control/AutoTreeLookUp/AutoTreeLookUp.Designer.cs diff --git a/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.Designer.cs b/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.Designer.cs deleted file mode 100644 index 735b475..0000000 --- a/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.Designer.cs +++ /dev/null @@ -1,59 +0,0 @@ -namespace Lskj.Control -{ - partial class AutoGridLookUp - { - /// - /// 必需的设计器变量。 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 清理所有正在使用的资源。 - /// - /// 如果应释放托管资源,为 true;否则为 false。 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 组件设计器生成的代码 - - /// - /// 设计器支持所需的方法 - 不要 - /// 使用代码编辑器修改此方法的内容。 - /// - private void InitializeComponent() - { - this.fProperties = new DevExpress.XtraEditors.Repository.RepositoryItemTextEdit(); - this.autoGridPopup1 = new Lskj.Control.AutoGridPopup(); - ((System.ComponentModel.ISupportInitialize)(this.fProperties)).BeginInit(); - this.SuspendLayout(); - // - // fProperties - // - this.fProperties.AutoHeight = false; - this.fProperties.Name = "fProperties"; - // - // autoGridPopup1 - // - this.autoGridPopup1.AddVisible = false; - this.autoGridPopup1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.autoGridPopup1.Location = new System.Drawing.Point(0, 0); - this.autoGridPopup1.Name = "autoGridPopup1"; - this.autoGridPopup1.Size = new System.Drawing.Size(260, 198); - this.autoGridPopup1.TabIndex = 0; - ((System.ComponentModel.ISupportInitialize)(this.fProperties)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private DevExpress.XtraEditors.Repository.RepositoryItemTextEdit fProperties; - private AutoGridPopup autoGridPopup1; - } -} diff --git a/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.cs b/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.cs index 2f2eaab..189e83f 100644 --- a/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.cs +++ b/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.cs @@ -1,28 +1,24 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Linq; -using System.Text; +using DevExpress.Utils.Menu; using DevExpress.XtraEditors; -using System.Drawing; -using DevExpress.XtraGrid.Views.Grid; -using System.Windows.Forms; -using System.Data; using DevExpress.XtraGrid.Columns; +using DevExpress.XtraGrid.Menu; +using DevExpress.XtraGrid.Views.Grid; +using Lskj.Business; using Lskj.Business.Impl; using Lskj.Control.Model; -using System.Threading; -using Lskj.Util; -using System.Text.RegularExpressions; -using Lskj.Data; -using DevExpress.XtraGrid.Menu; -using DevExpress.Utils.Menu; -using System.Data.SqlClient; -using Lskj.Business; -using Lskj.Model; using Lskj.Core; -using System.Threading.Tasks; +using Lskj.Data; +using Lskj.Model; +using Lskj.Util; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text.RegularExpressions; +using System.Threading; +using System.Windows.Forms; namespace Lskj.Control { @@ -284,8 +280,7 @@ namespace Lskj.Control /// /// 是否是主页模块搜索框 /// - public bool IsHomepage=false; - + public bool IsHomepage = false; /// /// 说明:隐藏弹出框 @@ -338,10 +333,9 @@ namespace Lskj.Control public AutoGridLookUp() { - InitializeComponent(); InitializePopup(); InitializeEvent(); - //this.Properties.Buttons[0].Kind = DevExpress.XtraEditors.Controls.ButtonPredefines.Down; + this.Disposed += OnDisposed; } /// @@ -356,7 +350,6 @@ namespace Lskj.Control private void InitializeEvent() { - //this.Disposed += new EventHandler(OnAutoGridLookUp_Disposed); this.GotFocus += new EventHandler(OnAutoGridLookUpGotFocus); this.LostFocus += new EventHandler(OnAutoGridLookUpLostFocus); this.KeyUp += new KeyEventHandler(OnAutoGridLookUpKeyUp); @@ -369,10 +362,7 @@ namespace Lskj.Control this._popup.GridControlObj.LostFocus += new EventHandler(OnAutoGridLookUpLostFocus); this._popup.OnGridViewMouseClick += new EventHandler(OnPopupGridViewMouseClick); this._popup.OnGridViewEnter += new KeyEventHandler(OnPopupGridViewEnter); - } - - /// /// 说明:初始化弹出框 /// 创建人:龚宇超 @@ -1001,7 +991,8 @@ namespace Lskj.Control foreach (DataColumn dcol in table.Columns) { - if ((dcol.ColumnName.Substring(0, 1) != "_") && (dcol.ColumnName.ToLower() != ValueField.ToLower()) && (dcol.ColumnName.ToLower() != TextMember.ToLower()) && (dcol.ColumnName.ToLower() != RemarkField.ToLower()) && ((int)dcol.ColumnName[0] > 127)) + string lowerColumnName = dcol.ColumnName.ToLower(); + if ((lowerColumnName.Substring(0, 1) != "_") && !lowerColumnName.Equals(ValueField, StringComparison.OrdinalIgnoreCase) && !lowerColumnName.Equals(TextMember, StringComparison.OrdinalIgnoreCase) && !lowerColumnName.Equals(RemarkField, StringComparison.OrdinalIgnoreCase) && ((int)dcol.ColumnName[0] > 127)) { GridColumn otherColumn = new GridColumn(); otherColumn.Name = otherColumn.FieldName = otherColumn.Caption = dcol.ColumnName; @@ -1033,7 +1024,7 @@ namespace Lskj.Control try { AutoGridPopup popupObj = obj as AutoGridPopup; - string[] columnsWidth = Model != null&&Model.LookUpFieldsWidth!=null ? Model.LookUpFieldsWidth.Trim().TrimEnd(',').Split(',') : null; + string[] columnsWidth = Model != null && Model.LookUpFieldsWidth != null ? Model.LookUpFieldsWidth.Trim().TrimEnd(',').Split(',') : null; if (Model != null && !string.IsNullOrWhiteSpace(Model.LookUpFieldsWidth) && columnsWidth.Length > 0) { if (this.InvokeRequired) @@ -1367,19 +1358,15 @@ namespace Lskj.Control BoolValue = true; break; } - } return BoolValue; - } catch (Exception ex) { return false; } - } - /// /// 值改变时刷新 /// @@ -1406,7 +1393,6 @@ namespace Lskj.Control // EditValue = this.Text; //} this.PopShowFlag = true; - } private void HandPopupSqlValueNew(object searchText) @@ -1509,10 +1495,8 @@ namespace Lskj.Control } } } - sqlValue = ControlObj.ReplaceControlValue(sourceSql.Replace("#", "")); } - if (!this._working) { Thread thread = new Thread(new ParameterizedThreadStart(RefreshPopupDataSourceNew)); @@ -1555,14 +1539,12 @@ namespace Lskj.Control } } DateTime endTime = DateTime.Now; - if (this._queryQueue.Count > 0) { // 在检索过程中还存在输入数据,则拿最后一次数据在进行匹配一次 Thread thread = new Thread(new ParameterizedThreadStart(RefreshPopupDataSourceNew)); thread.IsBackground = true; thread.Start(this._queryQueue.Last()); - this._queryQueue.Clear(); } else @@ -1570,23 +1552,4 @@ namespace Lskj.Control if (this.InvokeRequired) { this.Invoke(new EventHandler(delegate - { - int second = Convert.ToInt32((endTime - beginTime).TotalSeconds); - string tipMsg = "数据筛选完成."; - this.Popup.LabelObj.Text = second > 0 ? string.Format(tipMsg + "(耗时{0}秒)", second) : tipMsg; - this.Popup.GridControlObj.DataSource = table; - //this.DataSourceTable = table.Copy(); - this._working = false; - - this.CalcFormAndGrid(true); - })); - } - } - } - catch (Exception ex) - { - - } - } - } -} \ No newline at end of file + \ No newline at end of file diff --git a/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.resx b/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.resx deleted file mode 100644 index 2aeabc6..0000000 --- a/插件库/Lskj.Control/AutoGridLookUp/AutoGridLookUp.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - False - - \ No newline at end of file diff --git a/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.Designer.cs b/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.Designer.cs deleted file mode 100644 index 983b4e2..0000000 --- a/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.Designer.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace Lskj.Control -{ - partial class AutoGridRevLookUp - { - /// - /// 必需的设计器变量。 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 清理所有正在使用的资源。 - /// - /// 如果应释放托管资源,为 true;否则为 false。 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 组件设计器生成的代码 - - /// - /// 设计器支持所需的方法 - 不要 - /// 使用代码编辑器修改此方法的内容。 - /// - private void InitializeComponent() - { - this.autoGridRevPopup = new Lskj.Control.AutoGridRevPopup(); - this.SuspendLayout(); - // - // autoGridRevPopup - // - this.autoGridRevPopup.AddVisible = false; - this.autoGridRevPopup.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.autoGridRevPopup.Location = new System.Drawing.Point(0, 0); - this.autoGridRevPopup.Name = "autoGridRevPopup"; - this.autoGridRevPopup.Size = new System.Drawing.Size(260, 198); - this.autoGridRevPopup.TabIndex = 0; - this.ResumeLayout(false); - } - #endregion - private AutoGridRevPopup autoGridRevPopup; - } -} diff --git a/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.cs b/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.cs index d1babc9..62b44c3 100644 --- a/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.cs +++ b/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.cs @@ -317,9 +317,9 @@ namespace Lskj.Control public event EventHandler OnPopupClosed; public AutoGridRevLookUp() { - InitializeComponent(); InitializePopup(); InitializeEvent(); + this.Disposed += OnDisposed; } /// /// 说明:初始化事件 @@ -342,6 +342,7 @@ namespace Lskj.Control this._popup.OnGridViewMouseClick += new EventHandler(OnPopupGridViewMouseClick); this._popup.OnGridViewEnter += new KeyEventHandler(OnPopupGridViewEnter); } + /// /// 说明:初始化弹出框 /// 创建人:龚宇超 @@ -1160,31 +1161,6 @@ namespace Lskj.Control } //this.ShowPopup(); } - /// - /// 说明:释放时清理数据源 - /// 创建人:龚宇超 - /// 创建日期:2018-03-16 - /// 修改人: - /// 修改日期: - /// 修改备注: - /// 版本:1.0 - private void OnAutoGridLookUp_Disposed(object sender, EventArgs e) - { - if (this.DataSourceTable != null) - { - this.DataSourceTable.Clear(); - this.DataSourceTable.Dispose(); - } - if (this.DataSource != null) - { - this.DataSource = null; - } - GC.Collect(); - } - - - - /// /// 说明:判断输入的是否是中文 /// 创建人:龚宇超 @@ -1410,30 +1386,4 @@ namespace Lskj.Control { int second = Convert.ToInt32((endTime - beginTime).TotalSeconds); string tipMsg = "数据筛选完成."; - this.Popup.LabelObj.Text = second > 0 ? string.Format(tipMsg + "(耗时{0}秒)", second) : tipMsg; - this.Popup.GridControlObj.DataSource = table; - this._working = false; - //this.CalcFormAndGrid(); - })); - } - } - } - catch (Exception ex) - { - - } - } - - /// - /// 搜索回调 - /// - public void SearchCallBack() - { - this.HidePopup(); - if (this.OnSearchCallBack != null) - { - OnSearchCallBack(this, null); - } - } - } -} \ No newline at end of file + this.Popup.LabelObj.Text = \ No newline at end of file diff --git a/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.resx b/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.resx deleted file mode 100644 index ec9c0c0..0000000 --- a/插件库/Lskj.Control/AutoGridLookUp/AutoGridRevLookUp.resx +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - False - - \ No newline at end of file diff --git a/插件库/Lskj.Control/AutoTreeLookUp/AutoTreeLookUp.Designer.cs b/插件库/Lskj.Control/AutoTreeLookUp/AutoTreeLookUp.Designer.cs deleted file mode 100644 index 5f448a9..0000000 --- a/插件库/Lskj.Control/AutoTreeLookUp/AutoTreeLookUp.Designer.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace Lskj.Control -{ - partial class AutoTreeLookUp - { - /// - /// 必需的设计器变量。 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 清理所有正在使用的资源。 - /// - /// 如果应释放托管资源,为 true;否则为 false。 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 组件设计器生成的代码 - - /// - /// 设计器支持所需的方法 - 不要 - /// 使用代码编辑器修改此方法的内容。 - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - } - - #endregion - } -} diff --git a/插件库/Lskj.Control/AutoTreeLookUp/AutoTreeLookUp.cs b/插件库/Lskj.Control/AutoTreeLookUp/AutoTreeLookUp.cs index 021f411..4218909 100644 --- a/插件库/Lskj.Control/AutoTreeLookUp/AutoTreeLookUp.cs +++ b/插件库/Lskj.Control/AutoTreeLookUp/AutoTreeLookUp.cs @@ -327,9 +327,9 @@ namespace Lskj.Control public AutoTreeLookUp() { - InitializeComponent(); InitializePopup(); InitializeEvent(); + this.Disposed += OnDisposed; } /// @@ -343,7 +343,6 @@ namespace Lskj.Control /// private void InitializeEvent() { - this.Disposed += new EventHandler(OnAutoTreeLookUp_Disposed); this.MouseDown += new MouseEventHandler(OnAutoGridLookUpGotFocus); this.LostFocus += new EventHandler(OnAutoGridLookUpLostFocus); this.KeyUp += new KeyEventHandler(OnAutoGridLookUpKeyUp); @@ -751,8 +750,4 @@ namespace Lskj.Control /// 修改备注: /// 版本:1.0 /// - /// The source of the event. - /// The instance containing the event data. - protected void OnAutoGridLookUpKeyUp(object sender, KeyEventArgs e) - { - if (e.KeyCode == Keys.Ent \ No newline at end of file + /// The so \ No newline at end of file