diff --git a/DMX-2.0/SequenceurLineaire.cs b/DMX-2.0/SequenceurLineaire.cs index cf704ca..51b5d6b 100644 --- a/DMX-2.0/SequenceurLineaire.cs +++ b/DMX-2.0/SequenceurLineaire.cs @@ -102,6 +102,7 @@ namespace DMX2 } TimeSpan timeStamp = TimeSpan.Zero; + TimeSpan tempsTransition = TimeSpan.Zero; List circuitsSeq = new List (); List effets = new List (); Effet effetcourrant = null; @@ -229,8 +230,8 @@ namespace DMX2 timeStamp += time; if (enTransition) { - if (timeStamp < effetcourrant.Transition) { - double progression = timeStamp.TotalMilliseconds / effetcourrant.Transition.TotalMilliseconds; + if (timeStamp < tempsTransition) { + double progression = timeStamp.TotalMilliseconds / tempsTransition.TotalMilliseconds; foreach (Circuit c in circuitsSeq) { if (valeurscourantes [c] != effetcourrant [c] && !valeurschangees.ContainsKey (c)) { valeurscourantes [c] = (int)(progression * (effetcourrant [c] - valeursinitiales [c]) + valeursinitiales [c]); @@ -280,6 +281,7 @@ namespace DMX2 effetcourrant = effets [index]; valeurschangees.Clear (); valeursinitiales = new Dictionary (valeurscourantes); + tempsTransition = effetcourrant.Transition; enTransition = true; timeStamp = TimeSpan.Zero; if (ui != null) @@ -433,7 +435,7 @@ namespace DMX2 if (cmd.Groups ["transition"].Success) { int transition = int.Parse (cmd.Groups ["transition"].Value); - effetcourrant = new Effet ("", effetcourrant.Valeurs, effetcourrant.Duree, TimeSpan.FromMilliseconds (transition * 100)); + tempsTransition = TimeSpan.FromMilliseconds( transition *100); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs index abfa0f2..bebdc76 100644 --- a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs +++ b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs @@ -31,7 +31,6 @@ namespace DMX2 private global::Gtk.Button btnRetireLigne; private global::Gtk.ToggleButton btnBlackOut; private global::Gtk.ToggleButton btnPause; - private global::Gtk.ToggleButton togglebutton3; private global::Gtk.Label timeLabel; private global::Gtk.VScale masterScale; private global::Gtk.VSeparator vseparator1; @@ -268,30 +267,6 @@ namespace DMX2 w55.Expand = false; w55.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.togglebutton3 = new global::Gtk.ToggleButton (); - this.togglebutton3.CanFocus = true; - this.togglebutton3.Name = "togglebutton3"; - this.togglebutton3.UseUnderline = true; - // Container child togglebutton3.Gtk.Container+ContainerChild - global::Gtk.Alignment w56 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w57 = new global::Gtk.HBox (); - w57.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w58 = new global::Gtk.Image (); - w58.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-justify-fill", global::Gtk.IconSize.Dnd); - w57.Add (w58); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w60 = new global::Gtk.Label (); - w57.Add (w60); - w56.Add (w57); - this.togglebutton3.Add (w56); - this.vbox2.Add (this.togglebutton3); - global::Gtk.Box.BoxChild w64 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.togglebutton3])); - w64.Position = 6; - w64.Expand = false; - w64.Fill = false; - // Container child vbox2.Gtk.Box+BoxChild this.timeLabel = new global::Gtk.Label (); this.timeLabel.Name = "timeLabel"; this.timeLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("0.00"); @@ -299,11 +274,11 @@ namespace DMX2 this.timeLabel.Justify = ((global::Gtk.Justification)(2)); this.timeLabel.Angle = 90; this.vbox2.Add (this.timeLabel); - global::Gtk.Box.BoxChild w65 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.timeLabel])); - w65.Position = 7; - w65.Expand = false; - w65.Fill = false; - w65.Padding = ((uint)(10)); + global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.timeLabel])); + w56.Position = 6; + w56.Expand = false; + w56.Fill = false; + w56.Padding = ((uint)(10)); // Container child vbox2.Gtk.Box+BoxChild this.masterScale = new global::Gtk.VScale (null); this.masterScale.HeightRequest = 75; @@ -317,21 +292,21 @@ namespace DMX2 this.masterScale.Digits = 0; this.masterScale.ValuePos = ((global::Gtk.PositionType)(2)); this.vbox2.Add (this.masterScale); - global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.masterScale])); - w66.Position = 8; + global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.masterScale])); + w57.Position = 7; this.hbox1.Add (this.vbox2); - global::Gtk.Box.BoxChild w67 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2])); - w67.Position = 0; - w67.Expand = false; - w67.Fill = false; + global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2])); + w58.Position = 0; + w58.Expand = false; + w58.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.vseparator1 = new global::Gtk.VSeparator (); this.vseparator1.Name = "vseparator1"; this.hbox1.Add (this.vseparator1); - global::Gtk.Box.BoxChild w68 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vseparator1])); - w68.Position = 1; - w68.Expand = false; - w68.Fill = false; + global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vseparator1])); + w59.Position = 1; + w59.Expand = false; + w59.Fill = false; // Container child hbox1.Gtk.Box+BoxChild this.hpaned1 = new global::Gtk.HPaned (); this.hpaned1.CanFocus = true; @@ -352,8 +327,8 @@ namespace DMX2 this.MatriceUI.Name = "MatriceUI"; this.GtkScrolledWindow2.Add (this.MatriceUI); this.hpaned2.Add (this.GtkScrolledWindow2); - global::Gtk.Paned.PanedChild w70 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.GtkScrolledWindow2])); - w70.Resize = false; + global::Gtk.Paned.PanedChild w61 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.GtkScrolledWindow2])); + w61.Resize = false; // Container child hpaned2.Gtk.Paned+PanedChild this.onglets = new global::Gtk.Notebook (); this.onglets.CanFocus = true; @@ -361,8 +336,8 @@ namespace DMX2 this.onglets.CurrentPage = 1; this.hpaned2.Add (this.onglets); this.hpaned1.Add (this.hpaned2); - global::Gtk.Paned.PanedChild w72 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2])); - w72.Resize = false; + global::Gtk.Paned.PanedChild w63 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2])); + w63.Resize = false; // Container child hpaned1.Gtk.Paned+PanedChild this.scrolledwindow2 = new global::Gtk.ScrolledWindow (); this.scrolledwindow2.WidthRequest = 150; @@ -370,32 +345,32 @@ namespace DMX2 this.scrolledwindow2.Name = "scrolledwindow2"; this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child scrolledwindow2.Gtk.Container+ContainerChild - global::Gtk.Viewport w73 = new global::Gtk.Viewport (); - w73.ShadowType = ((global::Gtk.ShadowType)(0)); + global::Gtk.Viewport w64 = new global::Gtk.Viewport (); + w64.ShadowType = ((global::Gtk.ShadowType)(0)); // Container child GtkViewport1.Gtk.Container+ContainerChild this.vboxCircuits = new global::Gtk.VBox (); this.vboxCircuits.Name = "vboxCircuits"; this.vboxCircuits.Spacing = 2; - w73.Add (this.vboxCircuits); - this.scrolledwindow2.Add (w73); + w64.Add (this.vboxCircuits); + this.scrolledwindow2.Add (w64); this.hpaned1.Add (this.scrolledwindow2); - global::Gtk.Paned.PanedChild w76 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2])); - w76.Resize = false; - w76.Shrink = false; + global::Gtk.Paned.PanedChild w67 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2])); + w67.Resize = false; + w67.Shrink = false; this.hbox1.Add (this.hpaned1); - global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1])); - w77.Position = 2; + global::Gtk.Box.BoxChild w68 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1])); + w68.Position = 2; this.vbox1.Add (this.hbox1); - global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); - w78.Position = 0; + global::Gtk.Box.BoxChild w69 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); + w69.Position = 0; // Container child vbox1.Gtk.Box+BoxChild this.hseparator1 = new global::Gtk.HSeparator (); this.hseparator1.Name = "hseparator1"; this.vbox1.Add (this.hseparator1); - global::Gtk.Box.BoxChild w79 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); - w79.Position = 1; - w79.Expand = false; - w79.Fill = false; + global::Gtk.Box.BoxChild w70 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); + w70.Position = 1; + w70.Expand = false; + w70.Fill = false; // Container child vbox1.Gtk.Box+BoxChild this.hbox4 = new global::Gtk.HBox (); this.hbox4.Name = "hbox4"; @@ -406,17 +381,17 @@ namespace DMX2 this.toolbar7.Name = "toolbar7"; this.toolbar7.ShowArrow = false; this.hbox4.Add (this.toolbar7); - global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7])); - w80.Position = 0; - w80.Expand = false; - w80.Fill = false; + global::Gtk.Box.BoxChild w71 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7])); + w71.Position = 0; + w71.Expand = false; + w71.Fill = false; // Container child hbox4.Gtk.Box+BoxChild this.fixed5 = new global::Gtk.Fixed (); this.fixed5.Name = "fixed5"; this.fixed5.HasWindow = false; this.hbox4.Add (this.fixed5); - global::Gtk.Box.BoxChild w81 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.fixed5])); - w81.Position = 1; + global::Gtk.Box.BoxChild w72 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.fixed5])); + w72.Position = 1; // Container child hbox4.Gtk.Box+BoxChild this.UIManager.AddUiFromString (""); this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8"))); @@ -424,15 +399,15 @@ namespace DMX2 this.toolbar8.ShowArrow = false; this.toolbar8.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.hbox4.Add (this.toolbar8); - global::Gtk.Box.BoxChild w82 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8])); - w82.Position = 2; - w82.Expand = false; - w82.Fill = false; + global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8])); + w73.Position = 2; + w73.Expand = false; + w73.Fill = false; this.vbox1.Add (this.hbox4); - global::Gtk.Box.BoxChild w83 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4])); - w83.Position = 2; - w83.Expand = false; - w83.Fill = false; + global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4])); + w74.Position = 2; + w74.Expand = false; + w74.Fill = false; this.Add (this.vbox1); if ((this.Child != null)) { this.Child.ShowAll ();