SVN r1167

SVN-Revision: r1167
This commit is contained in:
cyf
2026-05-11 02:19:43 +00:00
parent 2e85136fbb
commit 2ed5b7975f
21 changed files with 475 additions and 156 deletions
@@ -405,7 +405,7 @@ namespace Lskj.Control
/// </summary>
private void CalcPopupLocation()
{
try
try
{
this._popup.Parent = this.GetParent(this.Parent);
@@ -468,7 +468,7 @@ namespace Lskj.Control
string Message = ErrorMessage.PromptErrorMessage(ex);
throw;
}
}
/// <summary>
/// <para>说明:</para>
@@ -1108,48 +1108,57 @@ namespace Lskj.Control
{
this.Invoke((EventHandler)delegate
{
DataTable table = this.Popup.GridControlObj.DataSourceTable();
int iIndexWidth = popupObj.GridViewObj.IndicatorWidth;
int iOtherWidth = 0;
int columnWidthIndex = 0;
foreach (GridColumn col in this.Popup.GridViewObj.Columns)
try
{
if (col.FieldName.Substring(0, 1) != "_")
DataTable table = this.Popup.GridControlObj.DataSourceTable();
int iIndexWidth = popupObj.GridViewObj.IndicatorWidth;
int iOtherWidth = 0;
int columnWidthIndex = 0;
foreach (GridColumn col in this.Popup.GridViewObj.Columns)
{
int width = 0;
if (columnWidthIndex < columnsWidth.Length)
if (col.FieldName.Substring(0, 1) != "_")
{
string widthStr = columnsWidth[columnWidthIndex];
width = int.TryParse(widthStr, out width) ? width : col.GetBestWidth();
columnWidthIndex += 1;
int width = 0;
if (columnWidthIndex < columnsWidth.Length)
{
string widthStr = columnsWidth[columnWidthIndex];
width = int.TryParse(widthStr, out width) ? width : col.GetBestWidth();
columnWidthIndex += 1;
}
else
{
width = col.GetBestWidth();
}
col.Width = width;
iOtherWidth += width;
}
else
}
int popupWidth = iIndexWidth + iOtherWidth + 40;
if (Model.LookUpWidth > 0)
{
popupWidth = iIndexWidth + Model.LookUpWidth + 25;
}
if (popupWidth != popupObj.Width)
{
if (popupWidth > _maxPopupWidth)
{
width = col.GetBestWidth();
popupWidth = _maxPopupWidth;
}
else if (popupWidth < _minPopupWidth)
{
popupWidth = _minPopupWidth;
}
col.Width = width;
iOtherWidth += width;
}
popupObj.Width = popupWidth;
this.CalcPopupLocation();
this._Handed = false;
}
int popupWidth = iIndexWidth + iOtherWidth + 40;
if (Model.LookUpWidth > 0)
catch (Exception ex)
{
popupWidth = iIndexWidth + Model.LookUpWidth + 25;
string Message = ErrorMessage.PromptErrorMessage(ex);
throw;
}
if (popupWidth != popupObj.Width)
{
if (popupWidth > _maxPopupWidth)
{
popupWidth = _maxPopupWidth;
}
else if (popupWidth < _minPopupWidth)
{
popupWidth = _minPopupWidth;
}
}
popupObj.Width = popupWidth;
this.CalcPopupLocation();
this._Handed = false;
});
}
}
@@ -1198,9 +1207,9 @@ namespace Lskj.Control
iValueWidth = iValueWidth < 50 ? 50 : iValueWidth + 10;
iTextWidth = iTextWidth < 50 ? 50 : iTextWidth + 10;
if(popupObj.GridViewObj.Columns.ColumnByFieldName(ValueMember)!=null) popupObj.GridViewObj.Columns[ValueMember].Width = iValueWidth;
if (popupObj.GridViewObj.Columns.ColumnByFieldName(ValueMember) != null) popupObj.GridViewObj.Columns[ValueMember].Width = iValueWidth;
if(popupObj.GridViewObj.Columns.ColumnByFieldName(TextMember) != null) popupObj.GridViewObj.Columns[TextMember].Width = iTextWidth;
if (popupObj.GridViewObj.Columns.ColumnByFieldName(TextMember) != null) popupObj.GridViewObj.Columns[TextMember].Width = iTextWidth;
if (hasReamrkField)
{
@@ -1227,7 +1236,7 @@ namespace Lskj.Control
this.CalcPopupLocation();
this._Handed = false;
}
catch (Exception ex)
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
throw;
@@ -1240,7 +1249,7 @@ namespace Lskj.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
throw;
//throw;
}
}
@@ -1465,13 +1474,6 @@ namespace Lskj.Control
/// <param name="e"></param>
private void AutoGridLookUp_TextChanged(object sender, EventArgs e)
{
//if (!string.IsNullOrWhiteSpace(this.Text))
//{
// if (SystemInfo.Instance.TrimWhiteSpace)
// this.HandPopupSqlValueNew(this.Text.Trim());//使用原来的方法
// else
// this.HandPopupSqlValueNew(this.Text);
//}
if (PopShowFlag)
{
if (SystemInfo.Instance.TrimWhiteSpace)