From 8be84ca4bdfca2b8af8cd57beb49d9c128f72c58 Mon Sep 17 00:00:00 2001 From: tzim Date: Mon, 22 Apr 2013 08:00:02 +0000 Subject: [PATCH] =?UTF-8?q?Limite=20les=20MAJ=20de=20l'affichage=20=C3=A0?= =?UTF-8?q?=201/10=20s=20Edition=20auto=20du=20nom=20a=20la=20sauvegarde?= =?UTF-8?q?=20de=20l'effet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DMX-2.0.userprefs | 7 +++---- DMX-2.0/Conduite.cs | 9 +++++++-- DMX-2.0/SeqLinUI.cs | 18 +++++++++++------- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/DMX-2.0.userprefs b/DMX-2.0.userprefs index 5ae35b8..9f9dcd3 100644 --- a/DMX-2.0.userprefs +++ b/DMX-2.0.userprefs @@ -2,12 +2,11 @@ - - - + + + - diff --git a/DMX-2.0/Conduite.cs b/DMX-2.0/Conduite.cs index 062d636..35caf96 100644 --- a/DMX-2.0/Conduite.cs +++ b/DMX-2.0/Conduite.cs @@ -14,12 +14,13 @@ namespace DMX2 Timer timer = null; DateTime lastTick; + DateTime lastUpd; public Conduite() { timer = new Timer(new TimerCallback(TimerTick),this, 10,10); - lastTick=DateTime.Now; + lastUpd = lastTick=DateTime.Now; } List circuits = new List(); @@ -125,7 +126,11 @@ namespace DMX2 } } // Cette fonction retourne quasi immédiatement, même si il y'a beaucoup a faire sur l'affichage - MainWindow.Win.ScheduleUpdate(); + + if(tickTime - lastUpd > TimeSpan.FromMilliseconds(100)){ + MainWindow.Win.ScheduleUpdate(); + lastUpd = DateTime.Now; + } if( ts > TimeSpan.FromMilliseconds(15) ) diff --git a/DMX-2.0/SeqLinUI.cs b/DMX-2.0/SeqLinUI.cs index 23343e9..1ba114d 100644 --- a/DMX-2.0/SeqLinUI.cs +++ b/DMX-2.0/SeqLinUI.cs @@ -11,6 +11,7 @@ namespace DMX2 bool fullUpdFlag = true; SequenceurLineaire sequenceur; ListStore lsEffets=null; + TreeViewColumn nomCol; public SeqLinUI (SequenceurLineaire s ) : base (s) { @@ -22,7 +23,7 @@ namespace DMX2 #region Construction listeEffets // Construction de la liste d'effets var numCol = new TreeViewColumn(); - var nomCol = new TreeViewColumn(); + nomCol = new TreeViewColumn(); var dureeCol = new TreeViewColumn(); var transCol = new TreeViewColumn(); @@ -46,6 +47,11 @@ namespace DMX2 dureeCol.SetCellDataFunc(dureeCell, new TreeCellDataFunc(RenderDuree)); transCol.SetCellDataFunc(transCell, new TreeCellDataFunc(RenderTrans)); + nomCol.MinWidth = 150; + nomCol.Expand=true; + dureeCol.MaxWidth=50; + transCol.MaxWidth=50; + effetsListe.AppendColumn(numCol); effetsListe.AppendColumn(nomCol); effetsListe.AppendColumn(transCol); @@ -269,9 +275,11 @@ namespace DMX2 protected void OnSaveActionActivated (object sender, EventArgs e) { //int d,t; if(!int.TryParse(dureeEntry.Text,out d) || !int.TryParse(transEntry.Text,out t)) return; - sequenceur.SauveEffet("Nouvel Effet", TimeSpan.Zero,TimeSpan.FromSeconds(5)); + TreeIter iter; + int pos = sequenceur.SauveEffet("Nouvel Effet", TimeSpan.Zero,TimeSpan.FromSeconds(5)); UpdListeEffets(); - + lsEffets.IterNthChild(out iter, pos); + effetsListe.SetCursor(lsEffets.GetPath(iter),nomCol,true); } @@ -295,10 +303,6 @@ namespace DMX2 sequenceur.FinDeTransition(); } - - - - } }