This commit is contained in:
parent
a22447e2e7
commit
6ac96814fe
3 changed files with 40 additions and 15 deletions
|
|
@ -221,11 +221,12 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EventManager.ProcessEvents();
|
||||||
}
|
}
|
||||||
// Cette fonction retourne quasi immédiatement, même si il y'a beaucoup a faire sur l'affichage
|
// Cette fonction retourne quasi immédiatement, même si il y'a beaucoup a faire sur l'affichage
|
||||||
}
|
}
|
||||||
|
|
||||||
EventManager.ProcessEvents();
|
|
||||||
|
|
||||||
if(tickTime - derniereMaj > TimeSpan.FromMilliseconds(50)){
|
if(tickTime - derniereMaj > TimeSpan.FromMilliseconds(50)){
|
||||||
MainWindow.Win.ScheduleUpdate();
|
MainWindow.Win.ScheduleUpdate();
|
||||||
|
|
@ -302,6 +303,11 @@ namespace DMX2
|
||||||
univ.Save(xmlUniversList);
|
univ.Save(xmlUniversList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XmlElement xmlMaster = xmlDoc.CreateElement("Master");
|
||||||
|
xmlMaster.SetAttribute("value",master.ToString());
|
||||||
|
EventManager.SaveBindings(xmlMaster,masterEventTarget);
|
||||||
|
xmlRoot.AppendChild(xmlMaster);
|
||||||
|
|
||||||
seqmaitre.Save(xmlRoot);
|
seqmaitre.Save(xmlRoot);
|
||||||
|
|
||||||
return xmlDoc;
|
return xmlDoc;
|
||||||
|
|
@ -344,6 +350,15 @@ namespace DMX2
|
||||||
univers.Add(u);
|
univers.Add(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XmlElement xmlMaster;
|
||||||
|
if((xmlMaster = root["Master"])!=null)
|
||||||
|
{
|
||||||
|
master = int.Parse( xmlMaster.GetAttribute("value"));
|
||||||
|
foreach(string id in EventManager.LoadBindings(xmlMaster))
|
||||||
|
BindMaster(id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
seqmaitre = SequenceurMaitre.Load(this,root["SequenceurMaitre"]);
|
seqmaitre = SequenceurMaitre.Load(this,root["SequenceurMaitre"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,15 +164,19 @@ namespace DMX2
|
||||||
|
|
||||||
TimeSpan timeStamp = TimeSpan.Zero;
|
TimeSpan timeStamp = TimeSpan.Zero;
|
||||||
TimeSpan tempsTransition = TimeSpan.Zero;
|
TimeSpan tempsTransition = TimeSpan.Zero;
|
||||||
List<Circuit> circuitsSeq = new List<Circuit> ();
|
|
||||||
List<Effet> effets = new List<Effet> ();
|
List<Effet> effets = new List<Effet> ();
|
||||||
Effet effetcourrant = null;
|
Effet effetcourrant = null;
|
||||||
bool enTransition = false;
|
bool enTransition = false;
|
||||||
|
bool paused=false;
|
||||||
|
|
||||||
|
|
||||||
|
// TODO rassembler tout ca en un seul dictionnaire ...
|
||||||
|
List<Circuit> circuitsSeq = new List<Circuit> ();
|
||||||
Dictionary<Circuit,int> valeurscourantes = new Dictionary<Circuit, int> ();
|
Dictionary<Circuit,int> valeurscourantes = new Dictionary<Circuit, int> ();
|
||||||
Dictionary<Circuit,int> valeursinitiales = new Dictionary<Circuit, int> ();
|
Dictionary<Circuit,int> valeursinitiales = new Dictionary<Circuit, int> ();
|
||||||
Dictionary<Circuit,bool> valeurschangees = new Dictionary<Circuit, bool> ();
|
Dictionary<Circuit,bool> valeurschangees = new Dictionary<Circuit, bool> ();
|
||||||
|
|
||||||
Dictionary<Circuit,circuitEventTarget> targets = new Dictionary<Circuit, circuitEventTarget>();
|
Dictionary<Circuit,circuitEventTarget> targets = new Dictionary<Circuit, circuitEventTarget>();
|
||||||
|
|
||||||
actionEventTarget masterEventTarget=null;
|
actionEventTarget masterEventTarget=null;
|
||||||
actionEventTarget goNextEventTarget=null;
|
actionEventTarget goNextEventTarget=null;
|
||||||
actionEventTarget goBackEventTarget=null;
|
actionEventTarget goBackEventTarget=null;
|
||||||
|
|
@ -261,18 +265,9 @@ namespace DMX2
|
||||||
circuitsSeq.Remove (c);
|
circuitsSeq.Remove (c);
|
||||||
valeurscourantes.Remove (c);
|
valeurscourantes.Remove (c);
|
||||||
valeursinitiales.Remove (c);
|
valeursinitiales.Remove (c);
|
||||||
|
targets.Remove(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*public override void MajCircuitsSupprimes ()
|
|
||||||
{
|
|
||||||
lock (this) {
|
|
||||||
foreach (var c in circuitsSeq.ToArray()) {
|
|
||||||
if (!Conduite.Courante.Circuits.Contains (c))
|
|
||||||
RetireCircuit (c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
public override int ValeurCircuit (Circuit c)
|
public override int ValeurCircuit (Circuit c)
|
||||||
{
|
{
|
||||||
lock(this) {
|
lock(this) {
|
||||||
|
|
@ -314,8 +309,6 @@ namespace DMX2
|
||||||
return targets[c].Attache;
|
return targets[c].Attache;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool paused=false;
|
|
||||||
|
|
||||||
public bool Paused {
|
public bool Paused {
|
||||||
get {
|
get {
|
||||||
return paused;
|
return paused;
|
||||||
|
|
|
||||||
|
|
@ -267,6 +267,12 @@ namespace DMX2
|
||||||
foreach(Ligne l in lignes)
|
foreach(Ligne l in lignes)
|
||||||
l.Save(el);
|
l.Save(el);
|
||||||
|
|
||||||
|
XmlElement xmlEl = parent.OwnerDocument.CreateElement ("EffetSuivant");
|
||||||
|
if(EventManager.SaveBindings(xmlEl,goNextEventTarget )) el.AppendChild(xmlEl);
|
||||||
|
|
||||||
|
xmlEl = parent.OwnerDocument.CreateElement ("EffetPrecedent");
|
||||||
|
if(EventManager.SaveBindings(xmlEl,goBackEventTarget )) el.AppendChild(xmlEl);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -278,6 +284,17 @@ namespace DMX2
|
||||||
seq.lignes.Add(Ligne.Load(c,xl as XmlElement));
|
seq.lignes.Add(Ligne.Load(c,xl as XmlElement));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
XmlElement xmlE;
|
||||||
|
if ((xmlE = el["EffetSuivant"])!= null)
|
||||||
|
foreach(string id in EventManager.LoadBindings(xmlE))
|
||||||
|
seq.BindEffetSuivant(id);
|
||||||
|
|
||||||
|
if ((xmlE = el["EffetPrecedent"])!= null)
|
||||||
|
foreach(string id in EventManager.LoadBindings(xmlE))
|
||||||
|
seq.BindEffetPrecedent(id);
|
||||||
|
|
||||||
|
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue