Пример #1
0
 protected void GuardValue_Execute(object action, HeliosActionEventArgs e)
 {
     SourceInterface.BeginTriggerBypass(e.BypassCascadingTriggers);
     GuardPosition = (int)e.Value.DoubleValue;
     SourceInterface.SendData(_actionData[GuardPosition - 1]);
     SourceInterface.EndTriggerBypass(e.BypassCascadingTriggers);
 }
Пример #2
0
 void AutoguardPositionAction_Execute(object action, HeliosActionEventArgs e)
 {
     if (GuardPosition == 2)
     {
         SourceInterface.BeginTriggerBypass(e.BypassCascadingTriggers);
         GuardPosition = 1;
         SourceInterface.SendData(_actionData[GuardPosition - 1]);
         SourceInterface.EndTriggerBypass(e.BypassCascadingTriggers);
     }
 }
Пример #3
0
 void SetPositionAction_Execute(object action, HeliosActionEventArgs e)
 {
     SourceInterface.BeginTriggerBypass(e.BypassCascadingTriggers);
     try
     {
         SwitchPosition = (HatPosition)Enum.Parse(typeof(HatPosition), e.Value.StringValue);
         SourceInterface.SendData(_sendData[SwitchPosition]);
     }
     catch
     {
         // No-op if the parse fails we won't set the position.
     }
     SourceInterface.EndTriggerBypass(e.BypassCascadingTriggers);
 }
Пример #4
0
 public override void Reset()
 {
     SourceInterface.BeginTriggerBypass(true);
     SwitchPosition = HatPosition.Center;
     SourceInterface.EndTriggerBypass(true);
 }