public HalloweenPictureFrame( CommandDevice medeaWizPlayer, [System.Runtime.CompilerServices.CallerMemberName] string name = "") : base(name) { PowerOn .SetLoop(true) .SetMaxRuntime(S(60)) .RunAction(ins => { medeaWizPlayer.SendCommand(this.controlToken, 99); ins.WaitFor(S(10)); }) .TearDown(ins => { medeaWizPlayer.SendCommand(this.controlToken, 255); }); }
public void Commit() { if (CommandDevice == null) { throw new NullReferenceException("Device cannot be null"); } if (Filter == null || Filter()) { CommandDevice.WriteTrue(); } else { if (AlternativeAction != null) { AlternativeAction(); } } }