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