SVN r692
SVN-Revision: r692
This commit is contained in:
@@ -206,6 +206,14 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 搜索界面
|
||||
/// </summary>
|
||||
public Panel TipsobjPanel
|
||||
{
|
||||
get { return this.TipsPanel; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 搜索界面
|
||||
/// </summary>
|
||||
@@ -5368,47 +5376,16 @@ namespace Lskj.Control
|
||||
/// 设置动态列提示信息
|
||||
/// </summary>
|
||||
/// <param name="ColumnName"></param>
|
||||
public void SetDisplayColumns(string text,int ForceSize, string ForceColor)
|
||||
public void SetDisplayColumns(string text)
|
||||
{
|
||||
if (!this.SysModel.SearchEnable)
|
||||
{
|
||||
|
||||
//不能搜索,并且传入提示值
|
||||
this.pl_top_fix_search.Visible = false;
|
||||
this.pl_top_right.Visible = false;
|
||||
this.TipsPanel.Visible = true;
|
||||
|
||||
|
||||
|
||||
if (!CreatePromptBox)
|
||||
{
|
||||
this.TopHeight = this.pl_top.Height;
|
||||
//代码的方式创建,直接拖的控件会提示线程问题
|
||||
this.TipsPanel.Controls.Clear();
|
||||
this.PromptBox = new LabelRichEdit();
|
||||
this.PromptBox.Dock = DockStyle.Fill;
|
||||
this.PromptBox.Padding = new Padding(3, 5, 0, 8);
|
||||
this.PromptBox.FontSize = ForceSize;//ForceSize;
|
||||
this.PromptBox.LabelText = "";
|
||||
//this.PromptBox.TextEdit.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
//this.PromptBox.TextEdit.BackColor = Color.FromArgb(173, 216, 230);
|
||||
//this.TipsPanel.BackColor = Color.FromArgb(173, 216, 230);
|
||||
if (!string.IsNullOrWhiteSpace(ForceColor))
|
||||
{
|
||||
this.PromptBox.TextEdit.ForeColor = ColorTranslator.FromHtml(ForceColor);
|
||||
}
|
||||
this.PromptBox.TextEdit.ReadOnly = true;
|
||||
this.TipsPanel.Controls.Add(this.PromptBox);
|
||||
|
||||
CreatePromptBox = true;
|
||||
}
|
||||
PromptBox.EditText = text;
|
||||
// 获取文档对象
|
||||
Document document = this.PromptBox.TextEdit.Document;
|
||||
document.BeginUpdate();
|
||||
try
|
||||
{
|
||||
|
||||
// 获取段落属性并设置行间距
|
||||
ParagraphProperties pp = document.BeginUpdateParagraphs(document.Range);
|
||||
// 设置行间距为1.2倍
|
||||
@@ -5422,18 +5399,72 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
//前4行高度
|
||||
int textHeight = (int)Math.Round(this.GetFirstThreeLinesHeight(PromptBox.TextEdit)*1.2) +20;
|
||||
if (textHeight > this.TopHeight)
|
||||
//int textHeight = (int)Math.Round(this.GetFirstThreeLinesHeight(PromptBox.TextEdit)*1.2) +20;
|
||||
//if (textHeight > this.TopHeight)
|
||||
//{
|
||||
// this.pl_top.Height = textHeight;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.pl_top.Height = this.TopHeight;
|
||||
//}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置分割条位置</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-02-01 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
protected void OnSplitterMoved(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.Model != null)
|
||||
{
|
||||
this.pl_top.Height = textHeight;
|
||||
IniHelper.Write(string.Format("base_grid_height_{0}", this.Model.ModuleCode), this.scc_container.SplitterPosition + "");
|
||||
}
|
||||
else
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:设置分割条位置</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-02-01 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void InitlizeSpiltLocation()
|
||||
{
|
||||
try
|
||||
{
|
||||
string htight = IniHelper.Read(string.Format("base_grid_height_{0}", this.Model.ModuleCode));
|
||||
if (!string.IsNullOrEmpty(htight))
|
||||
{
|
||||
this.pl_top.Height = this.TopHeight;
|
||||
this.scc_container.SplitterPosition = Convert.ToInt32(htight);
|
||||
}
|
||||
else {
|
||||
this.scc_container.SplitterPosition = 250;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Instance.WriteError(ex);
|
||||
string Message = ErrorMessage.PromptErrorMessage(ex);
|
||||
MessageUtil.Show(Message, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public int GetFirstThreeLinesHeight(RichEditControl richEdit)
|
||||
{
|
||||
if (string.IsNullOrEmpty(richEdit.Text)) return 0;
|
||||
|
||||
Reference in New Issue
Block a user