12 protected static const int LAST_UPDATED_REFRESH_RATE = 500;
15 protected static bool m_bIsOpen;
20 super.OnMenuOpen(preset);
27 m_Refresh.m_OnActivated.Insert(OnRefresh);
32 if (!m_ServicesStatusDialogComponent)
33 Print(
"No SCR_ServicesStatusDialogComponent component found | " + __FILE__ +
": " + __LINE__, LogLevel.WARNING);
40 protected override void OnMenuClose()
47 GetGame().GetCallqueue().Remove(UpdateRefreshWidgets);
48 GetGame().GetCallqueue().Remove(OnRefresh);
54 protected void OnRefresh()
65 protected void OnCommStatusUpdated(
SCR_ECommStatus status,
float responseTime,
float lastSuccessTime,
float lastFailTime)
73 GetGame().GetCallqueue().Remove(OnRefresh);
81 if (!m_ServicesStatusDialogComponent)
91 m_ServicesStatusDialogComponent.SetAllServicesState(
EServiceStatus.ERROR);
98 m_ServicesStatusDialogComponent.SetAllServicesState(
EServiceStatus.WARNING);
104 servicesStatus = UpdateServiceStates();
111 m_ServicesStatusDialogComponent.SetAllServicesState(
EServiceStatus.WARNING);
117 m_ServicesStatusDialogComponent.UpdateServicesMessage(status, servicesStatus);
120 m_ServicesStatusDialogComponent.SetStatusImageAndColor(m_wImgTitleIcon, servicesStatus,
true);
124 UpdateRefreshWidgets();
135 if (!mainStatus || mainStatus.Status().IsEmpty())
138 m_ServicesStatusDialogComponent.SetAllServicesState(generalStatus);
139 return generalStatus;
143 int errors, warnings, totalServices;
151 status = GetEnumStatus(serviceInfo.m_sServiceId);
152 m_ServicesStatusDialogComponent.SetServiceState(serviceInfo.m_sId, status);
164 if (errors + warnings == totalServices)
167 return generalStatus;
171 protected void UpdatePingValueUI()
173 if (!m_ServicesStatusDialogComponent)
180 protected void UpdateRefreshWidgets()
182 GetGame().GetCallqueue().Remove(UpdateRefreshWidgets);
183 GetGame().GetCallqueue().CallLater(UpdateRefreshWidgets, LAST_UPDATED_REFRESH_RATE);
188 if (!m_ServicesStatusDialogComponent)
205 return GetStatusFromString(serviceItem.Status());
225 static void OpenIfServicesAreNotOK()
239 protected static void OnCommStatusUpdatedOpenDialog(
SCR_ECommStatus status,
float responseTime,
float lastSuccessTime,
float lastFailTime)