提交当前本机最新程序
This commit is contained in:
@@ -203,9 +203,29 @@ namespace Lskj.Control
|
||||
}
|
||||
set
|
||||
{
|
||||
this.txtEdit.Text = value;
|
||||
//this.txtEdit.Text = value;
|
||||
this.txtEdit.Text = NormalizeMemoText(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 处理换行 (\n的换行不会生效,必须要\r\n才行。这里会把\n转成\r\n)
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
private static string NormalizeMemoText(string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value)) return value;
|
||||
|
||||
return value
|
||||
.Replace("\r\n", "\n") // 先把 CRLF 压成 LF
|
||||
.Replace("\r", "\n") // 再把单独 CR 压成 LF
|
||||
.Replace("\n", Environment.NewLine); // 最后统一成 Windows CRLF
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:设置控件提示文本</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
|
||||
Reference in New Issue
Block a user