c#超难问题

来源:百度知道 编辑:UC知道 时间:2024/09/27 13:17:13
int ctrcount = frmshow.Controls.Find("Ts_Data", true).Length;//在winform中寻找name 为"Ts_Data"的控件
if (ctrcount > 0)//若存在
{
int mypman = frmshow.Controls.Find("Ts_MacId", false).GetLength(0);//在winform中寻找name 为"Ts_MacId"的控件
if (mypman > 0)//若存在
{
Prictr = (Label)frmshow.Controls.Find("Ts_Data", false)[0];//将控件赋值给指定对象
Pmanctr = (Label)frmshow.Controls.Find("Ts_MacId", false)[0];//将控件赋值给指定对象
IsProsess = false; //停止其他函数中关于Prictr 和Pmanctr 的操作

if (Pmanctr.Text.Trim() != "") //是否为空字符
{
System.Diagnostics.Debug.Write("YES");
}

找个翻译软件先翻译再说啊!!

Pmanctr = (Label)frmshow.Controls.Find("Ts_MacId", true)[0];

无规律?神奇,那就难办了 ,一个逻辑上无规律的程序要它有什么用,你先把规律找出来吧

可能输入了不可见字符