Exemple #1
0
        private void addDateExpiredItems()
        {
            List <Item>        dateExpiredItems = ExpiryCriteria.getDateExpiredItems();
            List <AlarmStatus> dateAlarms       = new List <AlarmStatus>();

            for (int i = 0; i < dateExpiredItems.Count; i++)
            {
                alarms.Add(AlarmStatus.Danger);
            }
            monitoringItems.AddRange(dateExpiredItems);
            alarms.AddRange(dateAlarms);
        }
Exemple #2
0
        private void addTemperatureExpiredItems()
        {
            List <Item>        temepratureExpiredItems = ExpiryCriteria.getTemperatureExpiredItems();
            List <AlarmStatus> temperatureAlarms       = new List <AlarmStatus>();

            for (int i = 0; i < temepratureExpiredItems.Count; i++)
            {
                alarms.Add(AlarmStatus.Warning);
            }
            for (int i = 0; i < temepratureExpiredItems.Count; i++)
            {
                if (monitoringItems.Contains(temepratureExpiredItems[i]))
                {
                    temepratureExpiredItems.RemoveAt(i);
                    i--;
                }
            }
            monitoringItems.AddRange(temepratureExpiredItems);
            alarms.AddRange(temperatureAlarms);
        }