Alert Customization

Version 4

    First a little background on using alerts.


    To create a custom alert we will create a new filter


    This is controlled in xml, in ControlStylesConfig.xml

    the alert Setting object is defined as

    public partial class AlertSettings
        //These are defined in HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default
    //Play sound help
        public string Sound { get; set; }
    //Color Structure Color Structure (System.Drawing)
      public string ForeColor { get; set; }
        public string BackColor { get; set; }
        public FontSettings Font { get; set; }
        public string Image { get; set; }
        public string Key { get; set; }
        public string DisplayCategory { get; set; }
        public bool UseDialog { get; set; }

    in Control Styles under the allerts section this might look like

      <Alert Key="Alert_NewIncident" DisplayCategory="IncidentActivation" UseDialog="true">

    The Key is Tied to an appearance with the same value under a different section.

    <Appearance Key="Alert_NewIncident">
    <!--vbs script functions>
        <Evaluator>Vbs:Now &lt; DateAdd("n", 1,[TimeCreated])</Evaluator>
        <Caption>Hazard Incident [ID]</Caption>
        <Description>Hazards at Incident [ID]</Description>


    The alerts table is defined under the Alerts table at the top of the file. Any appearance with the same key below will tie into that table and display the alert. The UseDialog(default of false) will throw a message box forcing acknowledgement.


    So as this is setup every time you get a new incident in the grid with a time created less than 1 minute ago you will get a new alert, with the  SystemExclamation sound, Red ForeColor and a yellow BackColor. Not very pretty but should demonstrate how to do it.