Ejemplo n.º 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);
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 4
0
 public override void Reset()
 {
     SourceInterface.BeginTriggerBypass(true);
     SwitchPosition = HatPosition.Center;
     SourceInterface.EndTriggerBypass(true);
 }