///
/// 实例化委托,向Label控件赋值
///
///
///
public void SetLabelTipFunction(System.Windows.Forms.Label label, string tip)
{
if (label.InvokeRequired)
{
SetLabelTip delegateSetLabelTip = new SetLabelTip(SetLabelTipFunction);
label.Invoke(delegateSetLabelTip, new object[] { label, tip });
}
else
{
if (!string.IsNullOrWhiteSpace(tip))
{
label.Text = tip;
label.Visible = true;
}
else
{
label.Text = tip;
label.Visible = false;
}
}
}