Commit b8d7cb35 authored by tr's avatar tr

1、回显设置优化

parent 8f78f06d
......@@ -137,21 +137,7 @@ namespace Tools.MyUtils
/// <param name="m"></param>
public void SetEcho(DbItemModel m)
{
//设置回显的控件
if (this.EchoControl is Control)
{
(this.EchoControl as Control).Text = m.ToString();
}
//设置回显的工具栏标签
if (this.EchoControl is ToolStripLabel)
{
(this.EchoControl as ToolStripLabel).Text = m.ToString();
}
//设置回显的工具栏文本框
if (this.EchoControl is ToolStripTextBox)
{
(this.EchoControl as ToolStripTextBox).Text = m.ToString();
}
this.EchoControl?.GetType().GetProperty("Text")?.SetValue(this.EchoControl, m.ToString());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment