From 6393439f31527bb9c362e1193c5747244ec5bfe0 Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 31 May 2016 16:58:33 +0200 Subject: [PATCH] Suite modifs event --- DMX-2.0/SequenceurLineaire.cs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/DMX-2.0/SequenceurLineaire.cs b/DMX-2.0/SequenceurLineaire.cs index 7b676aa..57d3660 100644 --- a/DMX-2.0/SequenceurLineaire.cs +++ b/DMX-2.0/SequenceurLineaire.cs @@ -182,7 +182,10 @@ namespace DMX2 List feedbacks = new List(); bool IEventTarget.CanFeedback { get { return true; } } - + + void IEventTarget.ClearFeedBack(){ + feedbacks.Clear (); + } void IEventTarget.AddFeedback (IFeedbackInfo info) { feedbacks.Add(info); @@ -231,6 +234,8 @@ namespace DMX2 SeqLinUI ui = null; int master = 100; + int mastercible; + int masterinitial; public int Master { get { @@ -400,6 +405,8 @@ namespace DMX2 targets[c].FeedBack((byte)valeurscourantes [c]); } } + if(mastercible!=masterinitial) + Master = (int)(progression * (mastercible - masterinitial) + masterinitial); } else { FinDeTransition (); } @@ -424,6 +431,8 @@ namespace DMX2 if(targets.ContainsKey(c)) targets[c].FeedBack((byte)valeurscourantes [c]); } + if(masterinitial !=mastercible) + Master = mastercible; } } @@ -453,6 +462,7 @@ namespace DMX2 tempsTransition = effetcourrant.Transition; enTransition = true; timeStamp = TimeSpan.Zero; + masterinitial = mastercible = Master; if (ui != null) ui.EffetChange (); //foreach(var t in targets.Values) t.Attache = false; @@ -688,11 +698,11 @@ namespace DMX2 } static System.Text.RegularExpressions.Regex regexCommandExec = new System.Text.RegularExpressions.Regex( - @"(?\d+)(t(?\d+))?", + @"(?\d+)(m(?\d+))?(t(?\d+))?", System.Text.RegularExpressions.RegexOptions.Compiled); static System.Text.RegularExpressions.Regex regexCommandProcess = new System.Text.RegularExpressions.Regex( - @"(?\d+)(?(t\d+)?)?", + @"(?\d+)(?(m\d+)?(t\d+)?)?", System.Text.RegularExpressions.RegexOptions.Compiled); public override void Command (string command) @@ -711,6 +721,10 @@ namespace DMX2 int transition = int.Parse (cmd.Groups ["transition"].Value); tempsTransition = TimeSpan.FromMilliseconds( transition *100); } + + if (cmd.Groups ["master"].Success) { + mastercible = int.Parse (cmd.Groups ["master"].Value); + } } } }