private void LoadAction(Trigger triggerBeingLoaded, XmlNode actionNode)
        {
            string type = "";
            XmlNode input = null;

            //get the XML inputs
            foreach (XmlNode childNode in actionNode.ChildNodes)
            {
                switch (childNode.Name.ToUpper())
                {
                    case "TYPE":
                        type = childNode.FirstChild.Value;
                        break;
                    case "INPUT":
                        input = childNode;
                        break;
                }
            }

            //create the action of the correct type and add it to the trigger
            if (type.ToUpper() == "WAV")
            {
                var myAction = new PlayWavFile(input, _soundService);
                triggerBeingLoaded.AddAction(myAction);
            }
            else if (type.ToUpper() == "WAVRepeating".ToUpper())
            {
                var myAction = new RepeatWavFile(input, _soundService);
                triggerBeingLoaded.AddAction(myAction);
            }
            else if (type.ToUpper() == "SENDEMAIL")
            {
                var myAction = new SendEmail(input, _emailService);
                triggerBeingLoaded.AddAction(myAction);
            }
            else if (type.ToUpper() == "SENDSMS")
            {
                var myAction = new SendSms(input);
                triggerBeingLoaded.AddAction(myAction);
            }
            else if (type.ToUpperInvariant() == typeof(ExecuteFile).Name.ToUpperInvariant())
            {
                var myAction = new ExecuteFile(input);
                triggerBeingLoaded.AddAction(myAction);
            }
        }
 public void SetTrigger(Trigger trigger)
 {
     Trigger = trigger;
 }
 public void AddTrigger(Trigger trigger)
 {
     var myNode = new LinkedListNode<Trigger>(trigger);
     _triggers.AddLast(myNode);
     trigger.SetCheck(this);
 }