ARCed.Forms.Splash.SplashScreenForm.UdpateStatusTextWithStatus C# (CSharp) Метод

UdpateStatusTextWithStatus() публичный Метод

Update text with message color defined as white/yellow/red/ for success/warning/failure
public UdpateStatusTextWithStatus ( string Text, TypeOfMessage tom ) : void
Text string Message
tom TypeOfMessage Type of Message
Результат void
        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;
        }