private void M_OpcUaClient_OpcStatusChange(object sender, OpcUaStatusEventArgs e)
{
if (InvokeRequired)
{
BeginInvoke(new Action(() =>
{
M_OpcUaClient_OpcStatusChange(sender, e);//返回再调用
}));
return;
}
if (e.Error)
{
lblContent.BackColor = Color.Red;
}
else
{
lblContent.BackColor = SystemColors.Control;
}
lblContent.Text = e.ToString();
}