Beispiel #1
0
 //private Thread thread;
 internal Effect(Guid queue, int Channel, int Priority, byte?OriginalValue, byte NewValue, int Duration, EasingType EasingTypeIn, EasingType EasingTypeOut, EasingExtents Extents)
 {
     this.Queue    = queue;
     this.Priority = Priority;
     this.Channel  = Channel;
     //disable revert as multiple effects on same channels simultaneously cause bugs, if you want a light to revert to a non off state, have an effect which never ends
     if (OriginalValue != null)
     {
         this.OriginalValue = OriginalValue.Value;
     }
     else
     {
         this.OriginalValue = 0;
     }
     this.NewValue      = NewValue;
     this.Duration      = Duration;
     this.EasingTypeIn  = EasingTypeIn;
     this.EasingTypeOut = EasingTypeOut;
     this.Extents       = Extents;
     //this.OnComplete = OnComplete;
     //this.OnStep = OnStep;
     //this.InternalOnComplete = InternalOnComplete;
     //thread = new Thread(new ParameterizedThreadStart(ThreadAction));
     this.UniqueIdentifier = Guid.NewGuid();
 }
Beispiel #2
0
        public static Effect PulseDmxValue(Guid queue, int channel, int priority, byte startValue, byte endValue, int duration, EasingType typeIn, EasingType typeOut, EasingExtents extents)
        {
            var handle = new Pulse(queue, channel, priority, startValue, endValue, duration, typeIn, typeOut, extents);

            QueueEffect(handle);
            handle.Start();
            return(handle);
        }
Beispiel #3
0
        public static Effect EaseDmxValue(Guid queue, int channel, int priority, byte startValue, byte endValue, int duration, EasingType typeIn, EasingType typeOut, EasingExtents extents, DateTime when)
        {
            Effect handle = new Effect(queue, channel, priority, startValue, endValue, duration, typeIn, typeOut, extents);

            QueueEffect(handle);
            handle.StartIn((int)(when - DateTime.Now).TotalMilliseconds);
            return(handle);
        }
Beispiel #4
0
        public static Effect EaseDmxValue(Guid queue, int channel, int priority, byte endValue, int duration, EasingType typeIn, EasingType typeOut, EasingExtents extents)
        {
            byte   startValue = dmxDevice.GetDmxValue(channel);
            Effect handle     = new Effect(queue, channel, priority, startValue, endValue, duration, typeIn, typeOut, extents);

            QueueEffect(handle);
            handle.Start();
            return(handle);
        }
Beispiel #5
0
 //private Thread thread;
 internal Pulse(Guid Queue, int Channel, int Priority, byte OriginalValue, byte NewValue, int Duration, EasingType EasingTypeIn, EasingType EasingTypeOut, EasingExtents Extents) :
     base(Queue, Channel, Priority, OriginalValue, NewValue, Duration, EasingTypeIn, EasingTypeOut, Extents)
 {
 }