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 State_StateConditionTriggered(object sender, ScriptStateEventArgs e)
 {
     StateConditionTriggered?.Invoke(sender, e);
 }