Пример #1
0
 protected virtual void OnRight()
 {
     HomeSimCockpitSDK.VariableChangeSignalDelegate variableChanged = RightChanged;
     if (variableChanged != null)
     {
         variableChanged(_inputRight.Module, _inputRight.ID, true);
         variableChanged(_inputRight.Module, _inputRight.ID, false);
     }
 }
Пример #2
0
 public void UnregisterListenerForVariable(HomeSimCockpitSDK.VariableChangeSignalDelegate listenerMethod, string variableID)
 {
     foreach (Variable v in _input)
     {
         if (v.ID == variableID)
         {
             v.VariableChanged -= listenerMethod;
             return;
         }
     }
     throw new Exception("Nie istnieje zmienna o identyfikatorze '" + variableID + "'.");
 }
Пример #3
0
 public void RegisterListenerForVariable(HomeSimCockpitSDK.VariableChangeSignalDelegate listenerMethod, string variableID, HomeSimCockpitSDK.VariableType type)
 {
     foreach (Variable v in _input)
     {
         if (v.ID == variableID && v.Type == type)
         {
             v.VariableChanged += listenerMethod;
             return;
         }
     }
     throw new Exception(string.Format("Brak zmiennej o identyfikatorze '{0}' i type '{1}'.", variableID, type));
 }