private void SetEndDateDisplay()
        {
            var endDate   = new DateTime?();
            var labelText = "End:";

            if (!Session.IsInState(SessionState.RunComplete, SessionState.ShuttingDown, SessionState.ShutdownComplete))
            {
                labelText = "End (Est.):";
            }
            sessionEndPrompt.Text = labelText;

            if (Session.IsInState(SessionState.PauseComplete, SessionState.Pausing))
            {
                sessionEndLabel.Text = "Paused";
            }
            else
            {
                if (Session.ShutDownDate.HasValue)
                {
                    endDate = Session.ShutDownDate;
                }
                else if (Session.EstimatedEndDate.HasValue)
                {
                    endDate = Session.EstimatedEndDate;
                }
                sessionEndLabel.Text = GetDisplayText(endDate);
            }
        }
 private void sessionStateLabel_TextChanged(object sender, EventArgs e)
 {
     if (_session.IsInState(SessionState.RunComplete))
     {
         sessionStateLabel.BackColor = System.Drawing.Color.PaleGreen;
     }
     else if (_session.IsInState(SessionState.Error))
     {
         sessionStateLabel.BackColor = System.Drawing.Color.Pink;
     }
     else
     {
         sessionStateLabel.BackColor = DefaultBackColor;
     }
 }