private void UpdateServices(InfrastructureDto dto)
        {
            lblStatus.Text      = dto.Active ? Constants.Active : Constants.InActive;
            lblStatus.ForeColor = HealthHelper.GetHealthColor(dto.Active);
            var description = CdcDcStateHelper.GetActiveServiceDesc(dto);

            toolTip1.SetToolTip(lblStatus, description);
            lstServices.Items.Clear();
            foreach (ServiceDto service in dto.Services)
            {
                var status  = service.Alive ? Constants.Active : Constants.InActive;
                var message = string.Format("Last Heartbeat for server {0} service {1} is {2}, UTC: {3}", dto.Name, service.ServiceName, service.LastHeartbeat.ToString("dd-MMM-yyyy HH:mm:ss"), DateTime.UtcNow.ToString("dd-MMM-yyyy HH:mm:ss"));
                PscHighAvailabilityAppEnvironment.Instance.Logger.Log(message, LogLevel.Info);
                var hb = DateTimeConverter.ToDurationAgo(service.LastHeartbeat);
                message = string.Format("Last Heartbeat shown on UI for server {0} service {1} is {2}", dto.Name, service.ServiceName, hb);
                PscHighAvailabilityAppEnvironment.Instance.Logger.Log(message, LogLevel.Info);
                var          port   = service.Port == 0 ? string.Empty : service.Port.ToString();
                var          values = new string[] { service.ServiceName, service.Description, port, status, hb };
                ListViewItem item   = new ListViewItem(values)
                {
                    ImageIndex = (int)ImageIndex.Service
                };
                item.BackColor = service.Alive ? Color.LightGreen : Color.Pink;
                lstServices.Items.Add(item);
            }
            lstServices.Refresh();
        }
 private static string GetServiceDescription(InfrastructureDto dc)
 {
     return(dc.IsRemote ? string.Empty : CdcDcStateHelper.GetActiveServiceDesc(dc));
 }