private void DoOnUI()
{
string text = "something";
if (this.label1.InvokeRequired)
{
this.label1.BeginInvoke((MethodInvoker)delegate () { this.label1.Text = text; });
}
else
{
this.label1.Text = text;
}
}