Beispiel #1
0
 public void MatchSensor(string Sensor)
 {
     foreach (var Cond in Conditions)
     {
         if (Cond.MatchSensor(Sensor))
         {
             StateConditionTriggered?.Invoke(this, new ScriptStateEventArgs(Cond, Cond.NextState, false));
             if (Cond.NextState.Trim() != "")
             {
                 Deactivate();
                 StateCompleted?.Invoke(this, new ScriptStateEventArgs(Cond, Cond.NextState, false));
             }
         }
     }
 }
Beispiel #2
0
        private void Cond_TimerExpired(object sender, ScriptConditionEventArgs e)
        {
            ScriptCondition Cond = (ScriptCondition)sender;

            StateCompleted?.Invoke(this, new ScriptStateEventArgs(Cond, e.NextState, true));
        }
Beispiel #3
0
 public void CompleteState()
 {
     StateCompleted.Invoke(this);
 }