Example #1
0
 /// <summary>
 /// creates alert for a single given alertType
 /// </summary>
 /// <param name="alertType"></param>
 /// <param name="severity"></param>
 /// <param name="replacementSources"></param>
 public static void Alert(
     StationAlertType alertType,
     Alert.SeverityLevel severity,
     params IAlertReplacements[] replacementSources
     )
 {
     Alert(new List <StationAlertType>()
     {
         alertType
     }, severity, replacementSources);
 }
Example #2
0
        /// <summary>
        /// creates one combined alert for all alertTypes in the given list according to the order they have in the list.
        /// </summary>
        /// <param name="alertType"></param>
        /// <param name="severity"></param>
        /// <param name="replacementSources"></param>
        public static void Alert(
            List <StationAlertType> alertType,
            Alert.SeverityLevel severity,
            params IAlertReplacements[] replacementSources
            )
        {
            var message = GenerateAlertMessage(alertType, replacementSources);

            if (Single.StationLogGroup)
            {
                var newAlert = Single.CreateAlert(); // newAlert is an instance of the AlertRenderer class
                newAlert.Alert = new Alert {
                    AlertMessage = message,
                    Severity     = severity,
                    TimeStamp    = DateTime.Now
                };
            }
        }
Example #3
0
 public Color this[Alert.SeverityLevel index] => Map.ContainsKey(index) ? Map[index] : DefaultSeverityColor;