public void UdpateStatusTextWithStatus(string Text, TypeOfMessage tom)
{
if (InvokeRequired)
{
// We're not in the UI thread, so we need to call BeginInvoke
BeginInvoke(new StringParameterWithStatusDelegate(this.UdpateStatusTextWithStatus), new object[] { Text, tom });
return;
}
switch (tom)
{
case TypeOfMessage.Error:
this.labelStatus.ForeColor = Color.Red;
break;
case TypeOfMessage.Warning:
this.labelStatus.ForeColor = Color.Yellow;
break;
case TypeOfMessage.Success:
this.labelStatus.ForeColor = Color.AntiqueWhite;
break;
}
this.labelStatus.Text = Text;
}