Plein de choses:
Sequenceur Macro Fini Divers bugs Boutons pause, blackout ...
This commit is contained in:
parent
8bff9be4ee
commit
7813cf98f7
10 changed files with 905 additions and 379 deletions
|
|
@ -36,6 +36,8 @@ namespace DMX2
|
||||||
var u = new UniversDMX();
|
var u = new UniversDMX();
|
||||||
Patches.Add(u);
|
Patches.Add(u);
|
||||||
u.Nom = "Univers par Défaut";
|
u.Nom = "Univers par Défaut";
|
||||||
|
|
||||||
|
Pause = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -89,6 +91,10 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool Pause { get; set; }
|
||||||
|
|
||||||
|
public bool BlackOut { get; set ; }
|
||||||
|
|
||||||
public SequenceurMaitre SequenceurMaitre {
|
public SequenceurMaitre SequenceurMaitre {
|
||||||
get {
|
get {
|
||||||
return seqmaitre;
|
return seqmaitre;
|
||||||
|
|
@ -154,28 +160,40 @@ namespace DMX2
|
||||||
TimeSpan deltaT = tickTime - dernierTick;
|
TimeSpan deltaT = tickTime - dernierTick;
|
||||||
dernierTick = tickTime;
|
dernierTick = tickTime;
|
||||||
|
|
||||||
if( deltaT > TimeSpan.FromMilliseconds(15) )
|
if (!Pause) {
|
||||||
Console.WriteLine ("{0}", deltaT);
|
|
||||||
|
|
||||||
lock (this) {
|
if (deltaT > TimeSpan.FromMilliseconds (15))
|
||||||
|
Console.WriteLine ("{0}", deltaT);
|
||||||
|
|
||||||
seqmaitre.Tick(deltaT);
|
lock (this) {
|
||||||
|
|
||||||
// 'Actionne' les sequenceurs
|
seqmaitre.Tick (deltaT);
|
||||||
foreach (var seq in sequenceurs) {
|
|
||||||
seq.Tick (deltaT);
|
// 'Actionne' les sequenceurs
|
||||||
}
|
foreach (var seq in sequenceurs) {
|
||||||
|
seq.Tick (deltaT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mets a jour les valeurs circuits.
|
||||||
|
if(BlackOut)
|
||||||
|
{
|
||||||
|
foreach (var c in circuits)
|
||||||
|
c.ValeurCourante = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var c in circuits) {
|
||||||
|
int val = 0;
|
||||||
|
foreach (var seq in Sequenceurs) {
|
||||||
|
val = Math.Max (val, seq.ValeurCircuit (c));
|
||||||
|
}
|
||||||
|
c.ValeurCourante = val * master / 100;
|
||||||
|
}
|
||||||
|
|
||||||
// Mets a jour les valeurs circuits.
|
|
||||||
foreach (var c in circuits) {
|
|
||||||
int val = 0;
|
|
||||||
foreach (var seq in Sequenceurs) {
|
|
||||||
val = Math.Max (val, seq.ValeurCircuit (c));
|
|
||||||
}
|
}
|
||||||
c.ValeurCourante = val * master /100;
|
|
||||||
}
|
}
|
||||||
|
// 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
|
|
||||||
|
|
||||||
if(tickTime - derniereMaj > TimeSpan.FromMilliseconds(50)){
|
if(tickTime - derniereMaj > TimeSpan.FromMilliseconds(50)){
|
||||||
MainWindow.Win.ScheduleUpdate();
|
MainWindow.Win.ScheduleUpdate();
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,14 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region Sequenceur Maitre
|
#region Sequenceur Maitre
|
||||||
|
|
||||||
protected void ConstruitMatrice ()
|
protected void ConstruitMatrice ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
this.MatriceUI.EnableGridLines = TreeViewGridLines.Both;
|
||||||
|
|
||||||
var idCol = new Gtk.TreeViewColumn ();
|
var idCol = new Gtk.TreeViewColumn ();
|
||||||
var idCell = new Gtk.CellRendererText ();
|
var idCell = new Gtk.CellRendererText ();
|
||||||
|
|
@ -476,6 +479,7 @@ namespace DMX2
|
||||||
btnAjoutLigne.Sensitive = btnRetireLigne.Sensitive = btnGo.Sensitive = btnGoBack.Sensitive =
|
btnAjoutLigne.Sensitive = btnRetireLigne.Sensitive = btnGo.Sensitive = btnGoBack.Sensitive =
|
||||||
showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive =
|
showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive =
|
||||||
seqLinAction.Sensitive = seqMacroAction.Sensitive = circAction.Sensitive = saveAction.Sensitive =
|
seqLinAction.Sensitive = seqMacroAction.Sensitive = circAction.Sensitive = saveAction.Sensitive =
|
||||||
|
btnPause.Sensitive = btnBlackOut.Sensitive =
|
||||||
saveAsAction.Sensitive = closeAction.Sensitive = true;
|
saveAsAction.Sensitive = closeAction.Sensitive = true;
|
||||||
openAction.Sensitive = newAction.Sensitive = false;
|
openAction.Sensitive = newAction.Sensitive = false;
|
||||||
this.Title = "DMX 2.0 - " + Conduite.Courante.Name;
|
this.Title = "DMX 2.0 - " + Conduite.Courante.Name;
|
||||||
|
|
@ -484,6 +488,7 @@ namespace DMX2
|
||||||
btnAjoutLigne.Sensitive = btnRetireLigne.Sensitive = btnGo.Sensitive = btnGoBack.Sensitive =
|
btnAjoutLigne.Sensitive = btnRetireLigne.Sensitive = btnGo.Sensitive = btnGoBack.Sensitive =
|
||||||
showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive =
|
showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive =
|
||||||
seqLinAction.Sensitive = seqMacroAction.Sensitive = circAction.Sensitive = saveAction.Sensitive =
|
seqLinAction.Sensitive = seqMacroAction.Sensitive = circAction.Sensitive = saveAction.Sensitive =
|
||||||
|
btnPause.Sensitive = btnBlackOut.Sensitive =
|
||||||
saveAsAction.Sensitive = closeAction.Sensitive = false;
|
saveAsAction.Sensitive = closeAction.Sensitive = false;
|
||||||
openAction.Sensitive = newAction.Sensitive = true;
|
openAction.Sensitive = newAction.Sensitive = true;
|
||||||
this.Title = "DMX 2.0";
|
this.Title = "DMX 2.0";
|
||||||
|
|
@ -524,6 +529,8 @@ namespace DMX2
|
||||||
protected void OnMasterScaleValueChanged (object sender, EventArgs e)
|
protected void OnMasterScaleValueChanged (object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Conduite.Courante.Master = (int)(masterScale.Value);
|
Conduite.Courante.Master = (int)(masterScale.Value);
|
||||||
|
ChangeMatriceCouleur();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -570,6 +577,39 @@ namespace DMX2
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void OnBtnPauseToggled (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Conduite.Courante.Pause = btnPause.Active;
|
||||||
|
ChangeMatriceCouleur();
|
||||||
|
}
|
||||||
|
protected void OnBtnBlackOutToggled (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Conduite.Courante.BlackOut = btnBlackOut.Active;
|
||||||
|
ChangeMatriceCouleur();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangeMatriceCouleur ()
|
||||||
|
{
|
||||||
|
if (Conduite.Courante.BlackOut) {
|
||||||
|
|
||||||
|
|
||||||
|
ModifyBg (Gtk.StateType.Normal,new Gdk.Color (255, 100, 100));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Conduite.Courante.Pause) {
|
||||||
|
ModifyBg (Gtk.StateType.Normal,new Gdk.Color (255, 255, 100));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Conduite.Courante.Master != 100) {
|
||||||
|
ModifyBg (Gtk.StateType.Normal,new Gdk.Color (205, 205, 255));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModifyBg (Gtk.StateType.Normal, new Gdk.Color (255, 255, 255));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,9 @@ namespace DMX2
|
||||||
public partial class SeqMacroUI : SequenceurUI
|
public partial class SeqMacroUI : SequenceurUI
|
||||||
{
|
{
|
||||||
bool fullUpdFlag = true;
|
bool fullUpdFlag = true;
|
||||||
SequenceurMacro sequenceur;
|
SequenceurMacro sequenceur; /* pointe sur les données */
|
||||||
ListStore lsEffets=null;
|
ListStore lsEffets=null; /* liste des effets */
|
||||||
TreeViewColumn nomCol;
|
//TreeViewColumn nomCol; /* inutile dans le contexte macro */
|
||||||
ListStore lsMatrice = null;
|
|
||||||
|
|
||||||
bool effetChange = false;
|
bool effetChange = false;
|
||||||
public void EffetChange ()
|
public void EffetChange ()
|
||||||
|
|
@ -19,14 +18,47 @@ namespace DMX2
|
||||||
effetChange = true;
|
effetChange = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ConstruitMatrice ()
|
|
||||||
|
void OnButtonPressedEvent (object o, ButtonPressEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (e.Event.Button == 3) /* right click */
|
||||||
|
{
|
||||||
|
Menu m = new Menu();
|
||||||
|
MenuItem renameItem = new MenuItem("Renommer le Sequenceur");
|
||||||
|
renameItem.ButtonPressEvent += new ButtonPressEventHandler(OnRenameItemButtonPressed);
|
||||||
|
m.Add(renameItem);
|
||||||
|
m.ShowAll();
|
||||||
|
m.Popup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnRenameItemButtonPressed (object o, ButtonPressEventArgs args)
|
||||||
|
{
|
||||||
|
var dlg = new Dialog ("Nouveau Nom ?", GetAncestor(Gtk.Window.GType) as Gtk.Window , DialogFlags.Modal); var entry = new Entry (sequenceur.Name);
|
||||||
|
dlg.AddButton (Stock.Ok, ResponseType.Ok).GrabDefault(); dlg.AddButton (Stock.Cancel, ResponseType.Cancel);
|
||||||
|
dlg.VBox.Add (entry); dlg.VBox.ShowAll ();
|
||||||
|
entry.ActivatesDefault=true;
|
||||||
|
|
||||||
|
if ((ResponseType)dlg.Run () == ResponseType.Ok) {
|
||||||
|
sequenceur.Name = entry.Text;
|
||||||
|
titreLabel.Text = sequenceur.Name;
|
||||||
|
}
|
||||||
|
dlg.Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region construction et gestion de la matrice d'affichage
|
||||||
|
protected void ConstruitMatrice () /* Matrice d'affichage des effets de la macro */
|
||||||
|
{
|
||||||
|
|
||||||
|
effetsListe.EnableGridLines= TreeViewGridLines.Both;
|
||||||
|
|
||||||
var idCol = new Gtk.TreeViewColumn ();
|
var idCol = new Gtk.TreeViewColumn ();
|
||||||
var idCell = new Gtk.CellRendererText ();
|
var idCell = new Gtk.CellRendererText ();
|
||||||
|
|
||||||
idCol.Title = "Num";
|
idCol.Title = "Num";
|
||||||
idCol.PackStart (idCell, true);
|
idCol.PackStart (idCell, true);
|
||||||
idCol.SetCellDataFunc (idCell, new Gtk.TreeCellDataFunc (RenderMatriceNum));
|
idCol.SetCellDataFunc (idCell, new Gtk.TreeCellDataFunc (RenderMatriceNum));
|
||||||
this.MatriceUI.AppendColumn (idCol);
|
effetsListe.AppendColumn (idCol);
|
||||||
|
|
||||||
|
|
||||||
var nomCol = new Gtk.TreeViewColumn ();
|
var nomCol = new Gtk.TreeViewColumn ();
|
||||||
|
|
@ -35,8 +67,8 @@ namespace DMX2
|
||||||
nomCol.PackStart (nomCell, true);
|
nomCol.PackStart (nomCell, true);
|
||||||
nomCol.SetCellDataFunc (nomCell, new Gtk.TreeCellDataFunc (RenderMatriceNom));
|
nomCol.SetCellDataFunc (nomCell, new Gtk.TreeCellDataFunc (RenderMatriceNom));
|
||||||
nomCell.Editable = true;
|
nomCell.Editable = true;
|
||||||
//nomCell.Edited += OnNomCellEdited;
|
nomCell.Edited += OnNomCellEdited;
|
||||||
this.MatriceUI.AppendColumn (nomCol);
|
effetsListe.AppendColumn (nomCol);
|
||||||
|
|
||||||
var topCol = new Gtk.TreeViewColumn ();
|
var topCol = new Gtk.TreeViewColumn ();
|
||||||
var topCell = new Gtk.CellRendererText ();
|
var topCell = new Gtk.CellRendererText ();
|
||||||
|
|
@ -44,8 +76,8 @@ namespace DMX2
|
||||||
topCol.PackStart (topCell, true);
|
topCol.PackStart (topCell, true);
|
||||||
topCol.SetCellDataFunc (topCell, new Gtk.TreeCellDataFunc (RenderMatriceTop));
|
topCol.SetCellDataFunc (topCell, new Gtk.TreeCellDataFunc (RenderMatriceTop));
|
||||||
topCell.Editable = true;
|
topCell.Editable = true;
|
||||||
//topCell.Edited += OnTopCellEdited;
|
topCell.Edited += OnTopCellEdited;
|
||||||
this.MatriceUI.AppendColumn (topCol);
|
effetsListe.AppendColumn (topCol);
|
||||||
|
|
||||||
var circuitsCol = new Gtk.TreeViewColumn ();
|
var circuitsCol = new Gtk.TreeViewColumn ();
|
||||||
var circuitsCell = new Gtk.CellRendererText ();
|
var circuitsCell = new Gtk.CellRendererText ();
|
||||||
|
|
@ -53,17 +85,17 @@ namespace DMX2
|
||||||
circuitsCol.PackStart (circuitsCell, true);
|
circuitsCol.PackStart (circuitsCell, true);
|
||||||
circuitsCol.SetCellDataFunc (circuitsCell, new Gtk.TreeCellDataFunc (RenderMatriceCircuits));
|
circuitsCol.SetCellDataFunc (circuitsCell, new Gtk.TreeCellDataFunc (RenderMatriceCircuits));
|
||||||
circuitsCell.Editable = true;
|
circuitsCell.Editable = true;
|
||||||
//circuitsCell.Edited += OnCircuitsCellEdited;
|
circuitsCell.Edited += OnCircuitsCellEdited;
|
||||||
this.MatriceUI.AppendColumn (circuitsCol);
|
effetsListe.AppendColumn (circuitsCol);
|
||||||
|
|
||||||
var valeurCol = new Gtk.TreeViewColumn ();
|
var valeurCol = new Gtk.TreeViewColumn ();
|
||||||
var valeurCell = new Gtk.CellRendererText ();
|
var valeurCell = new Gtk.CellRendererText ();
|
||||||
valeurCol.Title = "Valeur";
|
valeurCol.Title = "Valeur";
|
||||||
valeurCol.PackStart (valeurCell, true);
|
valeurCol.PackStart (valeurCell, true);
|
||||||
valeurCol.SetCellDataFunc (circuitsCell, new Gtk.TreeCellDataFunc (RenderMatriceValeur));
|
valeurCol.SetCellDataFunc (valeurCell, new Gtk.TreeCellDataFunc (RenderMatriceValeur));
|
||||||
valeurCell.Editable = true;
|
valeurCell.Editable = true;
|
||||||
//valeurCell.Edited += OnValeurCellEdited;
|
valeurCell.Edited += OnValeurCellEdited;
|
||||||
this.MatriceUI.AppendColumn (valeurCol);
|
effetsListe.AppendColumn (valeurCol);
|
||||||
|
|
||||||
var tempsCol = new Gtk.TreeViewColumn ();
|
var tempsCol = new Gtk.TreeViewColumn ();
|
||||||
var tempsCell = new Gtk.CellRendererText ();
|
var tempsCell = new Gtk.CellRendererText ();
|
||||||
|
|
@ -71,13 +103,161 @@ namespace DMX2
|
||||||
tempsCol.PackStart (tempsCell, true);
|
tempsCol.PackStart (tempsCell, true);
|
||||||
tempsCol.SetCellDataFunc (tempsCell, new Gtk.TreeCellDataFunc (RenderMatriceTemps));
|
tempsCol.SetCellDataFunc (tempsCell, new Gtk.TreeCellDataFunc (RenderMatriceTemps));
|
||||||
tempsCell.Editable = true;
|
tempsCell.Editable = true;
|
||||||
//tempsCell.Edited += OnTempsCellEdited;
|
tempsCell.Edited += OnTempsCellEdited;
|
||||||
this.MatriceUI.AppendColumn (tempsCol);
|
effetsListe.AppendColumn (tempsCol);
|
||||||
|
|
||||||
lsMatrice = new Gtk.ListStore(typeof (SequenceurMaitre.Ligne)); // a modifier
|
lsEffets = new Gtk.ListStore(typeof (SequenceurMacro.Ligne));
|
||||||
this.MatriceUI.Model = lsMatrice;
|
this.effetsListe.Model = lsEffets;
|
||||||
|
UpdListeEffets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Gdk.Color colGrey= new Gdk.Color(200,200,200);
|
||||||
|
Gdk.Color colWhite= new Gdk.Color(255,255,255);
|
||||||
|
|
||||||
|
void RenderMatriceNum (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
string num=string.Empty;
|
||||||
|
SequenceurMacro.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMacro.Ligne;
|
||||||
|
if( sequenceur.IndexLigneEnCours == sequenceur.Lignes.IndexOf(l) )
|
||||||
|
num+= "->";
|
||||||
|
if( sequenceur.IndexLigneaSuivre == sequenceur.Lignes.IndexOf(l) )
|
||||||
|
num+= "* ";
|
||||||
|
(cell as Gtk.CellRendererText).Text = num + (sequenceur.Lignes.IndexOf(l)+1).ToString();
|
||||||
|
|
||||||
|
if(tree_model.GetPath (iter).Indices[0]%2 == 0)
|
||||||
|
cell.CellBackgroundGdk = colGrey;
|
||||||
|
else
|
||||||
|
cell.CellBackgroundGdk = colWhite;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceNom (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
SequenceurMacro.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMacro.Ligne;
|
||||||
|
(cell as Gtk.CellRendererText).Text = l.Nom;
|
||||||
|
if(tree_model.GetPath (iter).Indices[0]%2 == 0)
|
||||||
|
cell.CellBackgroundGdk = colGrey;
|
||||||
|
else
|
||||||
|
cell.CellBackgroundGdk = colWhite;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceTop (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
SequenceurMacro.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMacro.Ligne;
|
||||||
|
if (l.Top< TimeSpan.Zero) (cell as Gtk.CellRendererText).Text = string.Empty;
|
||||||
|
else (cell as Gtk.CellRendererText).Text = (l.Top.TotalMilliseconds /100).ToString();
|
||||||
|
if(tree_model.GetPath (iter).Indices[0]%2 == 0)
|
||||||
|
cell.CellBackgroundGdk = colGrey;
|
||||||
|
else
|
||||||
|
cell.CellBackgroundGdk = colWhite;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceCircuits (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
SequenceurMacro.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMacro.Ligne;
|
||||||
|
(cell as Gtk.CellRendererText).Text = l.Circuits;
|
||||||
|
if(tree_model.GetPath (iter).Indices[0]%2 == 0)
|
||||||
|
cell.CellBackgroundGdk = colGrey;
|
||||||
|
else
|
||||||
|
cell.CellBackgroundGdk = colWhite;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceValeur (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
SequenceurMacro.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMacro.Ligne;
|
||||||
|
(cell as Gtk.CellRendererText).Text = (l.Valeur).ToString();
|
||||||
|
if(tree_model.GetPath (iter).Indices[0]%2 == 0)
|
||||||
|
cell.CellBackgroundGdk = colGrey;
|
||||||
|
else
|
||||||
|
cell.CellBackgroundGdk = colWhite;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceTemps (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
SequenceurMacro.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMacro.Ligne;
|
||||||
|
(cell as Gtk.CellRendererText).Text = (l.Temps.TotalMilliseconds /100).ToString();
|
||||||
|
if(tree_model.GetPath (iter).Indices[0]%2 == 0)
|
||||||
|
cell.CellBackgroundGdk = colGrey;
|
||||||
|
else
|
||||||
|
cell.CellBackgroundGdk = colWhite;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnNomCellEdited (object o, EditedArgs args)
|
||||||
|
{
|
||||||
|
Gtk.TreeIter iter;
|
||||||
|
lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path));
|
||||||
|
SequenceurMacro.Ligne l = lsEffets.GetValue(iter,0) as SequenceurMacro.Ligne;
|
||||||
|
l.Nom = args.NewText;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnTopCellEdited (object o, EditedArgs args)
|
||||||
|
{
|
||||||
|
Gtk.TreeIter iter;
|
||||||
|
lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path));
|
||||||
|
SequenceurMacro.Ligne l = lsEffets.GetValue (iter, 0) as SequenceurMacro.Ligne;
|
||||||
|
if (args.NewText.Length == 0)
|
||||||
|
l.Top = TimeSpan.MinValue;
|
||||||
|
else {
|
||||||
|
int val;
|
||||||
|
if(int.TryParse(args.NewText, out val))
|
||||||
|
l.Top = TimeSpan.FromMilliseconds(val *100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnCircuitsCellEdited (object o, EditedArgs args)
|
||||||
|
{
|
||||||
|
Gtk.TreeIter iter;
|
||||||
|
lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path));
|
||||||
|
SequenceurMacro.Ligne l = lsEffets.GetValue(iter,0) as SequenceurMacro.Ligne;
|
||||||
|
l.Circuits = args.NewText;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OnValeurCellEdited (object o, EditedArgs args)
|
||||||
|
{
|
||||||
|
Gtk.TreeIter iter;
|
||||||
|
lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path));
|
||||||
|
SequenceurMacro.Ligne l = lsEffets.GetValue(iter,0) as SequenceurMacro.Ligne;
|
||||||
|
int val;
|
||||||
|
if(int.TryParse(args.NewText,out val)) l.Valeur = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnTempsCellEdited (object o, EditedArgs args)
|
||||||
|
{
|
||||||
|
Gtk.TreeIter iter;
|
||||||
|
lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path));
|
||||||
|
SequenceurMacro.Ligne l = lsEffets.GetValue (iter, 0) as SequenceurMacro.Ligne;
|
||||||
|
if (args.NewText.Length == 0)
|
||||||
|
l.Temps = TimeSpan.Zero;
|
||||||
|
else {
|
||||||
|
int val;
|
||||||
|
if(int.TryParse(args.NewText, out val))
|
||||||
|
l.Temps = TimeSpan.FromMilliseconds(val *100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void UpdListeEffets ()
|
||||||
|
{
|
||||||
|
lsEffets.Clear();
|
||||||
|
foreach (var ligne in sequenceur.Lignes) {
|
||||||
|
lsEffets.AppendValues(ligne);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public SeqMacroUI (SequenceurMacro s ) : base (s)
|
public SeqMacroUI (SequenceurMacro s ) : base (s)
|
||||||
{
|
{
|
||||||
this.Build ();
|
this.Build ();
|
||||||
|
|
@ -85,46 +265,43 @@ namespace DMX2
|
||||||
sequenceur = s;
|
sequenceur = s;
|
||||||
ConstruitMatrice ();
|
ConstruitMatrice ();
|
||||||
|
|
||||||
|
frame1.ButtonPressEvent += OnButtonPressedEvent;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderMatriceNum (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void RenderMatriceNom (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void RenderMatriceTop (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void RenderMatriceCircuits (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void RenderMatriceValeur (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void RenderMatriceTemps (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
|
||||||
{
|
|
||||||
throw new NotImplementedException ();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Update (bool full)
|
public override void Update (bool full)
|
||||||
{
|
{
|
||||||
|
if (fullUpdFlag || full)
|
||||||
|
FullUpdate ();
|
||||||
|
// UpdateValues (); inutil dans le contexte
|
||||||
|
timeLabel.LabelProp = string.Format (@"<big>{0:0\.0}</big>", sequenceur.TimeStamp.TotalMilliseconds / 100);
|
||||||
|
|
||||||
|
/*if (sequenceur.EffetCourrant.Duree != TimeSpan.Zero)
|
||||||
|
pbDuree.Fraction = Math.Min (1.0d, sequenceur.TimeStamp.TotalMilliseconds / sequenceur.EffetCourrant.Duree.TotalMilliseconds);
|
||||||
|
else
|
||||||
|
pbDuree.Fraction = 0.0d;
|
||||||
|
|
||||||
|
if (sequenceur.EffetCourrant.Transition != TimeSpan.Zero)
|
||||||
|
pbDuree.Fraction = Math.Min (1.0d, sequenceur.TimeStamp.TotalMilliseconds / sequenceur.EffetCourrant.Transition.TotalMilliseconds);
|
||||||
|
else
|
||||||
|
pbDuree.Fraction = 0.0d;*/
|
||||||
|
|
||||||
|
if (effetChange) {
|
||||||
|
UpdListeEffets();
|
||||||
|
SelectionneEffet (sequenceur.IndexLigneEnCours);
|
||||||
|
posLabel.Text = string.Format("n°{0}",sequenceur.IndexLigneEnCours +1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SelectionneEffet (int index)
|
||||||
|
{
|
||||||
|
if(index <0 ) return;
|
||||||
|
effetsListe.SetCursor( new TreePath( new int[1] {index }) ,null,false);
|
||||||
|
effetChange = false;
|
||||||
|
}
|
||||||
|
|
||||||
protected void OnCircuitsActionActivated (object sender, EventArgs e)
|
protected void OnCircuitsActionActivated (object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// récupère la fenètre principale
|
// récupère la fenètre principale
|
||||||
|
|
@ -142,13 +319,103 @@ namespace DMX2
|
||||||
this.Destroy();
|
this.Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void FullUpdate ()
|
||||||
|
{
|
||||||
|
fullUpdFlag = true;
|
||||||
|
|
||||||
|
|
||||||
|
foreach (Circuit c in sequenceur.Circuits) {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
seqMasterScale.Value = sequenceur.Master;
|
||||||
|
|
||||||
|
posLabel.Text = string.Format("n°{0}",sequenceur.IndexLigneEnCours +1);
|
||||||
|
|
||||||
|
fullUpdFlag=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int IndexEffetSelectionne()
|
||||||
|
{
|
||||||
|
var sel = effetsListe.Selection.GetSelectedRows();
|
||||||
|
if(sel.Length ==0) return -1;
|
||||||
|
return effetsListe.Selection.GetSelectedRows()[0].Indices[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnGoForwardActionActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// Si l'effet courant est selectioné, on passe au suivant, sinon, on passe a celui selectionné.
|
||||||
|
/*if(sequenceur.IndexEffetCourrant == IndexEffetSelectionne())
|
||||||
|
sequenceur.IndexEffetCourrant++;
|
||||||
|
else
|
||||||
|
sequenceur.IndexEffetCourrant = IndexEffetSelectionne();*/
|
||||||
|
|
||||||
|
sequenceur.LigneSuivante();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnGoBackActionActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (sequenceur.IndexLigneEnCours > 0) {
|
||||||
|
sequenceur.IndexLigneaSuivre = sequenceur.IndexLigneEnCours - 1;
|
||||||
|
sequenceur.LigneSuivante ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnMediaPauseActionActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
sequenceur.Paused = ! sequenceur.Paused;
|
||||||
|
}
|
||||||
|
|
||||||
protected void OnSeqMasterScaleValueChanged (object sender, EventArgs e)
|
protected void OnSeqMasterScaleValueChanged (object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (fullUpdFlag)return;
|
if (fullUpdFlag)return;
|
||||||
sequenceur.Master = (int)(seqMasterScale.Value);
|
sequenceur.Master = (int)(seqMasterScale.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void OnBtnAjoutLigneActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int pos=IndexEffetSelectionne() + 1;
|
||||||
|
sequenceur.AjoutLigne(pos);
|
||||||
|
UpdListeEffets();
|
||||||
|
effetsListe.SetCursor( new TreePath( new int[1] {pos }) , effetsListe.Columns[1] ,true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnRemoveLigneActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
int pos = IndexEffetSelectionne();
|
||||||
|
if (pos==-1) return;
|
||||||
|
sequenceur.RetireLigne(pos);
|
||||||
|
UpdListeEffets();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnEffetsListeCursorChanged (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if(effetChange) return;
|
||||||
|
TreeViewColumn col;
|
||||||
|
TreePath path;
|
||||||
|
effetsListe.GetCursor (out path, out col);
|
||||||
|
|
||||||
|
if (effetsListe.Columns [0] == col) {
|
||||||
|
sequenceur.IndexLigneaSuivre = IndexEffetSelectionne();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected void OnBtnCommandClicked (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
sequenceur.CommandDirecte(txtCommand.Text );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,8 @@ namespace DMX2
|
||||||
switch (el.Name) {
|
switch (el.Name) {
|
||||||
case "SequenceurLineaire":
|
case "SequenceurLineaire":
|
||||||
return SequenceurLineaire.Load(conduite, el);
|
return SequenceurLineaire.Load(conduite, el);
|
||||||
|
case "SequenceurMacro":
|
||||||
|
return SequenceurMacro.Load(conduite,el);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,116 +1,137 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Xml;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
namespace DMX2
|
namespace DMX2
|
||||||
{
|
{
|
||||||
public class SequenceurMacro : Sequenceur
|
public class SequenceurMacro : Sequenceur
|
||||||
{
|
{
|
||||||
public class Effet
|
public class Ligne {
|
||||||
{
|
public Ligne(){}
|
||||||
|
string nom = string.Empty;
|
||||||
string _nom;
|
TimeSpan top = TimeSpan.MinValue;
|
||||||
|
string circuits = string.Empty;
|
||||||
public Effet (string nom, Dictionary<Circuit,int> valeurs, TimeSpan duree, TimeSpan transition)
|
int valeur;
|
||||||
{
|
TimeSpan temps = TimeSpan.Zero;
|
||||||
_nom = nom;
|
|
||||||
_valeurs = new Dictionary<Circuit, int> (valeurs);
|
|
||||||
_duree = duree;
|
|
||||||
_transition = transition;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Nom {
|
public string Nom {
|
||||||
get {
|
get {
|
||||||
return _nom;
|
return nom;
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
_nom = value;
|
nom = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<Circuit,int> _valeurs;
|
public TimeSpan Top {
|
||||||
|
|
||||||
public int this [Circuit index] {
|
|
||||||
get {
|
get {
|
||||||
if (!_valeurs.ContainsKey (index))
|
return top;
|
||||||
_valeurs.Add (index, 0);
|
}
|
||||||
return _valeurs [index];
|
set {
|
||||||
|
top = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<Circuit, int> Valeurs {
|
public string Circuits {
|
||||||
get {
|
get {
|
||||||
return _valeurs;
|
return circuits;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
circuits = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void RetireCircuit (Circuit c)
|
|
||||||
|
public int Valeur {
|
||||||
|
get {
|
||||||
|
return valeur;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
valeur = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimeSpan Temps {
|
||||||
|
get {
|
||||||
|
return temps;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
temps = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Save (XmlElement parent)
|
||||||
{
|
{
|
||||||
_valeurs.Remove (c);
|
XmlElement el = parent.OwnerDocument.CreateElement ("Ligne");
|
||||||
}
|
|
||||||
|
|
||||||
TimeSpan _duree = TimeSpan.Zero ;
|
|
||||||
TimeSpan _transition = TimeSpan.Zero;
|
|
||||||
|
|
||||||
public TimeSpan Duree {
|
|
||||||
get {
|
|
||||||
return _duree;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
_duree = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public TimeSpan Transition {
|
|
||||||
get {
|
|
||||||
return _transition;
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
_transition = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void Save (System.Xml.XmlElement parent)
|
|
||||||
{
|
|
||||||
System.Xml.XmlElement el = parent.OwnerDocument.CreateElement ("Effet");
|
|
||||||
System.Xml.XmlElement xmlVal;
|
|
||||||
parent.AppendChild (el);
|
parent.AppendChild (el);
|
||||||
el.SetAttribute("nom",_nom);
|
|
||||||
el.SetAttribute ("duree", _duree.ToString ());
|
el.SetAttribute ("nom", nom);
|
||||||
el.SetAttribute ("transition", _transition.ToString ());
|
el.SetAttribute ("top", top.ToString ());
|
||||||
foreach (var valeur in _valeurs) {
|
el.SetAttribute ("circuits", circuits);
|
||||||
xmlVal = parent.OwnerDocument.CreateElement("Valeur");
|
el.SetAttribute ("valeur", valeur.ToString ());
|
||||||
el.AppendChild(xmlVal);
|
el.SetAttribute ("temps", temps.ToString ());
|
||||||
xmlVal.SetAttribute("circuit",valeur.Key.ID.ToString());
|
|
||||||
xmlVal.SetAttribute("valeur",valeur.Value.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static Effet Load (Conduite conduite, System.Xml.XmlElement el)
|
|
||||||
{
|
|
||||||
Dictionary<Circuit, int> valeurs = new Dictionary<Circuit, int> ();
|
|
||||||
foreach (var xv in el.GetElementsByTagName("Valeur")) {
|
|
||||||
System.Xml.XmlElement xval = xv as System.Xml.XmlElement;
|
|
||||||
valeurs.Add(
|
|
||||||
conduite.GetCircuitByID(int.Parse(xval.GetAttribute("circuit"))),
|
|
||||||
int.Parse(xval.GetAttribute("valeur"))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return new Effet( el.GetAttribute("nom"),valeurs,
|
|
||||||
TimeSpan.Parse(el.GetAttribute("duree")),
|
|
||||||
TimeSpan.Parse(el.GetAttribute("transition"))
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Ligne Load (Conduite c, XmlElement el)
|
||||||
|
{
|
||||||
|
Ligne l = new Ligne();
|
||||||
|
l.nom = el.GetAttribute ("nom");
|
||||||
|
l.top = TimeSpan.Parse(el.GetAttribute("top"));
|
||||||
|
l.circuits = el.GetAttribute ("circuits");
|
||||||
|
l.valeur = int.Parse(el.GetAttribute("valeur"));
|
||||||
|
l.temps = TimeSpan.Parse(el.GetAttribute("temps"));
|
||||||
|
|
||||||
|
return l;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeSpan timeStamp = TimeSpan.Zero;
|
public class EffetMacro
|
||||||
List<Circuit> circuitsSeq = new List<Circuit> ();
|
{
|
||||||
List<Effet> effets = new List<Effet> ();
|
public EffetMacro( TimeSpan tempsTransition, int valeurInitiale, int valeurFinale) {
|
||||||
Effet effetcourrant = null;
|
TempsPasse = TimeSpan.Zero;
|
||||||
bool enTransition = false;
|
TempsTransition = tempsTransition;
|
||||||
Dictionary<Circuit,int> valeurscourantes = new Dictionary<Circuit, int> ();
|
ValeurInitiale= valeurInitiale;
|
||||||
Dictionary<Circuit,int> valeursinitiales = new Dictionary<Circuit, int> ();
|
ValeurFinale = valeurFinale;
|
||||||
Dictionary<Circuit,bool> valeurschangees = new Dictionary<Circuit, bool> ();
|
}
|
||||||
SeqMacroUI ui = null;
|
public TimeSpan TempsPasse { get; set; }
|
||||||
|
public TimeSpan TempsTransition { get; set; }
|
||||||
|
public int ValeurInitiale { get; set; }
|
||||||
|
public int ValeurFinale { get; set; }
|
||||||
|
public bool Incremente (TimeSpan delta)
|
||||||
|
{
|
||||||
|
TempsPasse += delta;
|
||||||
|
if (TempsPasse > TempsTransition) {
|
||||||
|
TempsPasse = TempsTransition;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
public int ValeurCourante()
|
||||||
|
{
|
||||||
|
double progression = TempsPasse.TotalMilliseconds/TempsTransition.TotalMilliseconds;
|
||||||
|
return (int)( progression * (ValeurFinale - ValeurInitiale) + ValeurInitiale );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Ligne> lignes = new List<Ligne>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
TimeSpan timeStamp = TimeSpan.Zero;
|
||||||
|
TimeSpan topSuivant = TimeSpan.Zero;
|
||||||
|
bool topPresent = false;
|
||||||
|
|
||||||
|
List<Circuit> circuitsSeq = new List<Circuit> ();
|
||||||
|
|
||||||
|
|
||||||
|
Dictionary<Circuit,int> valeurscourantes = new Dictionary<Circuit, int> ();
|
||||||
|
Dictionary<Circuit,EffetMacro> effetsEnCours = new Dictionary<Circuit, EffetMacro>();
|
||||||
|
|
||||||
|
SeqMacroUI ui = null;
|
||||||
|
bool change = false;
|
||||||
int master = 100;
|
int master = 100;
|
||||||
|
|
||||||
public int Master {
|
public int Master {
|
||||||
|
|
@ -124,7 +145,59 @@ namespace DMX2
|
||||||
|
|
||||||
public SequenceurMacro ()
|
public SequenceurMacro ()
|
||||||
{
|
{
|
||||||
effetcourrant = new Effet ("",valeurscourantes , TimeSpan.Zero, TimeSpan.Zero);
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int IndexLigneEnCours
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
if (enCours == null) return -1;
|
||||||
|
return lignes.IndexOf(enCours);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ligne aSuivre = null;
|
||||||
|
Ligne enCours = null;
|
||||||
|
Ligne ligneMaitre = null;
|
||||||
|
|
||||||
|
|
||||||
|
public int IndexLigneaSuivre
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
if (aSuivre == null)
|
||||||
|
return -1;
|
||||||
|
return lignes.IndexOf (aSuivre);
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
aSuivre = lignes[value];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int AjoutLigne (int pos)
|
||||||
|
{
|
||||||
|
lock (this) {
|
||||||
|
lignes.Insert (pos, new Ligne ());
|
||||||
|
CommandAdd(pos);
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RetireLigne (int pos)
|
||||||
|
{
|
||||||
|
lock (this) {
|
||||||
|
lock (this) {
|
||||||
|
if (lignes [pos] == enCours) {
|
||||||
|
enCours = null;
|
||||||
|
if (pos + 1 < lignes.Count)
|
||||||
|
aSuivre = lignes [pos + 1];
|
||||||
|
}
|
||||||
|
if (lignes [pos] == aSuivre)
|
||||||
|
aSuivre = null;
|
||||||
|
lignes.RemoveAt (pos);
|
||||||
|
CommandRemove(pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TimeSpan TimeStamp {
|
public TimeSpan TimeStamp {
|
||||||
|
|
@ -133,15 +206,17 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadOnlyCollection<Circuit> Circuits {
|
|
||||||
|
public ReadOnlyCollection<Ligne> Lignes {
|
||||||
get {
|
get {
|
||||||
return circuitsSeq.AsReadOnly ();
|
return lignes.AsReadOnly();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ReadOnlyCollection<Effet> Effets {
|
|
||||||
|
public ReadOnlyCollection<Circuit> Circuits {
|
||||||
get {
|
get {
|
||||||
return effets.AsReadOnly ();
|
return circuitsSeq.AsReadOnly ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,17 +237,12 @@ namespace DMX2
|
||||||
void AjouteCircuit (Circuit c)
|
void AjouteCircuit (Circuit c)
|
||||||
{
|
{
|
||||||
valeurscourantes [c] = 0;
|
valeurscourantes [c] = 0;
|
||||||
valeursinitiales [c] = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RetireCircuit (Circuit c)
|
private void RetireCircuit (Circuit c)
|
||||||
{
|
{
|
||||||
foreach (var ef in effets) {
|
|
||||||
ef.RetireCircuit (c);
|
|
||||||
}
|
|
||||||
circuitsSeq.Remove (c);
|
circuitsSeq.Remove (c);
|
||||||
valeurscourantes.Remove (c);
|
valeurscourantes.Remove (c);
|
||||||
valeursinitiales.Remove (c);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void MajCircuitsSupprimes ()
|
public override void MajCircuitsSupprimes ()
|
||||||
|
|
@ -201,17 +271,6 @@ namespace DMX2
|
||||||
return valeurscourantes [c];
|
return valeurscourantes [c];
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChangeValeur (Circuit c, int value)
|
|
||||||
{
|
|
||||||
valeurschangees [c] = true;
|
|
||||||
valeurscourantes [c] = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool EstChange (Circuit c)
|
|
||||||
{
|
|
||||||
return valeurschangees.ContainsKey (c);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool paused=false;
|
bool paused=false;
|
||||||
|
|
||||||
public bool Paused {
|
public bool Paused {
|
||||||
|
|
@ -225,129 +284,129 @@ namespace DMX2
|
||||||
|
|
||||||
public override void Tick (TimeSpan time)
|
public override void Tick (TimeSpan time)
|
||||||
{
|
{
|
||||||
if (paused) return;
|
if (paused)
|
||||||
|
return;
|
||||||
timeStamp += time;
|
timeStamp += time;
|
||||||
|
|
||||||
if (enTransition) {
|
|
||||||
if (timeStamp < effetcourrant.Transition) {
|
lock (this) {
|
||||||
double progression = timeStamp.TotalMilliseconds / effetcourrant.Transition.TotalMilliseconds;
|
List<Circuit> circuits = new List<Circuit> (effetsEnCours.Keys);
|
||||||
foreach (Circuit c in circuitsSeq) {
|
|
||||||
if (valeurscourantes [c] != effetcourrant [c] && !valeurschangees.ContainsKey (c)) {
|
foreach (Circuit c in circuits) {
|
||||||
valeurscourantes [c] = (int)(progression * (effetcourrant [c] - valeursinitiales [c]) + valeursinitiales [c]);
|
if (effetsEnCours [c].Incremente (time)) {
|
||||||
}
|
valeurscourantes [c] = effetsEnCours [c].ValeurFinale;
|
||||||
|
effetsEnCours.Remove (c);
|
||||||
|
} else {
|
||||||
|
valeurscourantes [c] = effetsEnCours [c].ValeurCourante ();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
FinDeTransition ();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (effetcourrant.Duree != TimeSpan.Zero && timeStamp >= effetcourrant.Duree) {
|
|
||||||
int index = effets.IndexOf (effetcourrant) + 1;
|
if (topPresent) {
|
||||||
if (index < effets.Count)
|
if (timeStamp > topSuivant){
|
||||||
ChangeEffetCourrant (index);
|
LigneSuivante();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void LigneSuivante ()
|
||||||
|
|
||||||
public void FinDeTransition ()
|
|
||||||
{
|
|
||||||
enTransition = false;
|
|
||||||
foreach (Circuit c in circuitsSeq)
|
|
||||||
if(!valeurschangees.ContainsKey (c))
|
|
||||||
valeurscourantes [c] = effetcourrant [c];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public SequenceurMacro.Effet EffetCourrant {
|
|
||||||
get {
|
|
||||||
return effetcourrant;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int IndexEffetCourrant {
|
|
||||||
get {
|
|
||||||
return effets.IndexOf(effetcourrant);
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
if(value>=0 && value < effets.Count)
|
|
||||||
ChangeEffetCourrant(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ChangeEffetCourrant (int index)
|
|
||||||
{
|
{
|
||||||
lock (this) {
|
lock (this) {
|
||||||
effetcourrant = effets [index];
|
if(lignes.Count==0) return;
|
||||||
valeurschangees.Clear ();
|
int index;
|
||||||
valeursinitiales = new Dictionary<Circuit, int> (valeurscourantes);
|
change = true; topPresent = false;
|
||||||
enTransition = true;
|
if(aSuivre==null) // selection souris
|
||||||
timeStamp = TimeSpan.Zero;
|
{
|
||||||
if (ui != null)
|
index = IndexLigneEnCours +1; // Premier effet si aucun précédement
|
||||||
ui.EffetChange ();
|
if(index>= lignes.Count) index = 0; // Boucle si arrivé à la fin
|
||||||
|
|
||||||
|
enCours = lignes[index];
|
||||||
|
|
||||||
|
// Gestion de la Reprise
|
||||||
|
if(enCours.Circuits.Equals("R") && ligneMaitre != null)
|
||||||
|
enCours = ligneMaitre;
|
||||||
|
|
||||||
|
if(enCours.Nom.Length!=0)
|
||||||
|
{
|
||||||
|
ligneMaitre = enCours;
|
||||||
|
timeStamp = TimeSpan.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
enCours = aSuivre;
|
||||||
|
ligneMaitre = enCours;
|
||||||
|
timeStamp = TimeSpan.Zero;
|
||||||
|
|
||||||
|
}
|
||||||
|
index = IndexLigneEnCours+1;
|
||||||
|
if(index<lignes.Count)
|
||||||
|
{
|
||||||
|
// Si top présent - non negatif
|
||||||
|
if(lignes[index].Top>= TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
topPresent = true;
|
||||||
|
topSuivant= lignes[index].Top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
aSuivre = null;
|
||||||
|
LanceEffetsMacro(false,TimeSpan.Zero);
|
||||||
|
if(ui!=null)
|
||||||
|
ui.EffetChange();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int SauveEffet (string nom, TimeSpan duree, TimeSpan transition)
|
void LanceEffetsMacro (bool ecrase, TimeSpan tempsMatrice)
|
||||||
{
|
{
|
||||||
lock (this) {
|
lock (this) {
|
||||||
effets.Add (effetcourrant = new Effet (nom, valeurscourantes, duree, transition));
|
if (ecrase)
|
||||||
return effets.Count-1;
|
LanceEffetsMacro (enCours.Circuits, enCours.Valeur, tempsMatrice);
|
||||||
|
else
|
||||||
|
LanceEffetsMacro (enCours.Circuits, enCours.Valeur, enCours.Temps);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void LanceEffetsMacro (string circuits, int valeurCible, TimeSpan temps)
|
||||||
|
{
|
||||||
|
if(circuits==null)return;
|
||||||
|
string[] blocs = circuits.Split(',');
|
||||||
|
foreach (string bloc in blocs) {
|
||||||
|
string[] circ = bloc.Split('-');
|
||||||
|
int start, end;
|
||||||
|
if(! int.TryParse(circ[0], out start))
|
||||||
|
continue;
|
||||||
|
if(circ.Length > 1) // on a affaire a un bloc (de plusieurs)
|
||||||
|
{
|
||||||
|
if(! int.TryParse(circ[1], out end))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
end= start;
|
||||||
|
for( int i = start; i<=end; i++)
|
||||||
|
{
|
||||||
|
Circuit c = Conduite.Courante.GetCircuitByID(i);
|
||||||
|
if(circuitsSeq.Contains(c))
|
||||||
|
{
|
||||||
|
if(effetsEnCours.ContainsKey(c)) effetsEnCours.Remove(c);
|
||||||
|
effetsEnCours.Add(c, new EffetMacro(temps,valeurscourantes[c],valeurCible));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int InsereEffetApres (int index, string nom, TimeSpan duree, TimeSpan transition)
|
|
||||||
|
public bool LigneChange ()
|
||||||
{
|
{
|
||||||
lock (this) {
|
if (change) {
|
||||||
int pos = index+1;
|
change = false;
|
||||||
if (pos >= effets.Count) return SauveEffet(nom,duree,transition);
|
return true;
|
||||||
effets.Insert (pos,effetcourrant = new Effet (nom, valeurscourantes, duree, transition));
|
|
||||||
CommandAdd(index);
|
|
||||||
return pos;
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemplaceEffet (int index)
|
|
||||||
{
|
|
||||||
lock (this) {
|
|
||||||
Effet ef = effets[index];
|
|
||||||
effets[index] = new Effet (ef.Nom, valeurscourantes, ef.Duree, ef.Transition);
|
|
||||||
effetcourrant = effets[index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SupprimeEffet (int index)
|
|
||||||
{
|
|
||||||
lock (this) {
|
|
||||||
effets.RemoveAt (index);
|
|
||||||
CommandRemove(index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int MonteEffet (int index)
|
|
||||||
{
|
|
||||||
lock (this) {
|
|
||||||
if (index >= effets.Count || index < 1)
|
|
||||||
return index;
|
|
||||||
Effet ef = effets [index];
|
|
||||||
effets.RemoveAt (index);
|
|
||||||
effets.Insert (index - 1, ef);
|
|
||||||
CommandSwap (index - 1);
|
|
||||||
return index - 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int BaisseEffet (int index)
|
|
||||||
{
|
|
||||||
lock (this) {
|
|
||||||
if (index > effets.Count - 2 || index < 0)
|
|
||||||
return index;
|
|
||||||
Effet ef = effets [index];
|
|
||||||
effets.RemoveAt (index);
|
|
||||||
effets.Insert (index + 1, ef);
|
|
||||||
CommandSwap(index);
|
|
||||||
return index + 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Save (System.Xml.XmlElement parent)
|
public override void Save (System.Xml.XmlElement parent)
|
||||||
{
|
{
|
||||||
|
|
@ -364,8 +423,8 @@ namespace DMX2
|
||||||
xmlC.SetAttribute("id",c.ID.ToString());
|
xmlC.SetAttribute("id",c.ID.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Effet ef in effets) {
|
foreach (Ligne li in lignes) {
|
||||||
ef.Save(el);
|
li.Save(el);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -407,10 +466,29 @@ namespace DMX2
|
||||||
AjouteCircuit (c);
|
AjouteCircuit (c);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var xe in el.GetElementsByTagName("Effet"))
|
foreach (var xe in el.GetElementsByTagName("Ligne"))
|
||||||
effets.Add(Effet.Load(conduite,xe as System.Xml.XmlElement));
|
lignes.Add(Ligne.Load(conduite,xe as System.Xml.XmlElement));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static System.Text.RegularExpressions.Regex regexCommandeDirecte = new System.Text.RegularExpressions.Regex(
|
||||||
|
@"(?<circuits>[\d,-]+) (?<valeur>\d+) (?<temps>\d+)",
|
||||||
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
|
||||||
|
public void CommandDirecte (string text)
|
||||||
|
{
|
||||||
|
var cmd = regexCommandeDirecte.Match (text);
|
||||||
|
if (cmd.Success) {
|
||||||
|
string circuits = cmd.Groups["circuits"].Value;
|
||||||
|
|
||||||
|
int valeur = int.Parse(cmd.Groups["valeur"].Value);
|
||||||
|
TimeSpan temps = TimeSpan.FromMilliseconds(100* int.Parse(cmd.Groups["temps"].Value));
|
||||||
|
|
||||||
|
LanceEffetsMacro(circuits,valeur,temps);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO : implementer commandes seqmaitre
|
||||||
static System.Text.RegularExpressions.Regex regexCommand1 = new System.Text.RegularExpressions.Regex(
|
static System.Text.RegularExpressions.Regex regexCommand1 = new System.Text.RegularExpressions.Regex(
|
||||||
@"(?<effet>\d+)(t(?<transition>\d+))?",
|
@"(?<effet>\d+)(t(?<transition>\d+))?",
|
||||||
System.Text.RegularExpressions.RegexOptions.Compiled);
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
@ -419,6 +497,8 @@ namespace DMX2
|
||||||
@"(?<effet>\d+)(?<params>(t\d+)?)?",
|
@"(?<effet>\d+)(?<params>(t\d+)?)?",
|
||||||
System.Text.RegularExpressions.RegexOptions.Compiled);
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override void Command (string command)
|
public override void Command (string command)
|
||||||
{
|
{
|
||||||
lock (this) {
|
lock (this) {
|
||||||
|
|
@ -427,14 +507,37 @@ namespace DMX2
|
||||||
if (cmd.Success) {
|
if (cmd.Success) {
|
||||||
if (cmd.Groups ["effet"].Success) {
|
if (cmd.Groups ["effet"].Success) {
|
||||||
int effet = int.Parse (cmd.Groups ["effet"].Value) - 1;
|
int effet = int.Parse (cmd.Groups ["effet"].Value) - 1;
|
||||||
if (effet < effets.Count)
|
int transition=-1;
|
||||||
ChangeEffetCourrant (effet);
|
|
||||||
|
if(effet>=lignes.Count) return;
|
||||||
|
enCours = lignes[effet];
|
||||||
|
ligneMaitre = enCours;
|
||||||
|
timeStamp = TimeSpan.Zero;
|
||||||
|
|
||||||
|
|
||||||
|
int index = IndexLigneEnCours+1;
|
||||||
|
if(index<lignes.Count)
|
||||||
|
{
|
||||||
|
// Si top présent - non negatif
|
||||||
|
if(lignes[index].Top>= TimeSpan.Zero)
|
||||||
|
{
|
||||||
|
topPresent = true;
|
||||||
|
topSuivant= lignes[index].Top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
aSuivre = null;
|
||||||
|
|
||||||
|
if (cmd.Groups ["transition"].Success) {
|
||||||
|
transition = int.Parse (cmd.Groups ["transition"].Value);
|
||||||
|
LanceEffetsMacro(true, TimeSpan.FromMilliseconds(transition *100));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
LanceEffetsMacro(false,TimeSpan.Zero);
|
||||||
|
|
||||||
|
if(ui!=null) ui.EffetChange();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd.Groups ["transition"].Success) {
|
|
||||||
int transition = int.Parse (cmd.Groups ["transition"].Value);
|
|
||||||
effetcourrant = new Effet ("", effetcourrant.Valeurs, effetcourrant.Duree, TimeSpan.FromMilliseconds (transition * 100));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,7 @@ namespace DMX2
|
||||||
public void EffetSuivant ()
|
public void EffetSuivant ()
|
||||||
{
|
{
|
||||||
lock (this) {
|
lock (this) {
|
||||||
|
if(lignes.Count==0) return;
|
||||||
if (aSuivre == null) {
|
if (aSuivre == null) {
|
||||||
if (IndexLigneEnCours + 1 < lignes.Count)
|
if (IndexLigneEnCours + 1 < lignes.Count)
|
||||||
enCours = lignes [IndexLigneEnCours + 1];
|
enCours = lignes [IndexLigneEnCours + 1];
|
||||||
|
|
@ -134,6 +135,7 @@ namespace DMX2
|
||||||
public void EffetPrecedent ()
|
public void EffetPrecedent ()
|
||||||
{
|
{
|
||||||
lock (this) {
|
lock (this) {
|
||||||
|
if(lignes.Count==0) return;
|
||||||
if (IndexLigneEnCours > 0)
|
if (IndexLigneEnCours > 0)
|
||||||
enCours = lignes [IndexLigneEnCours - 1];
|
enCours = lignes [IndexLigneEnCours - 1];
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -66,21 +66,21 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
|
|
||||||
g= _dimmers[i];
|
g= _dimmers[i];
|
||||||
|
if(g.circuitAssocié !=null) {
|
||||||
switch (g.fonctionTransfert) {
|
switch (g.fonctionTransfert) {
|
||||||
case FTransfer.lineaire:
|
case FTransfer.lineaire:
|
||||||
if(g.circuitAssocié !=null)
|
|
||||||
valeurs[i+offset] = (byte)( g.circuitAssocié.ValeurCourante * g.param1 /100);
|
valeurs[i+offset] = (byte)( g.circuitAssocié.ValeurCourante * g.param1 /100);
|
||||||
else
|
break;
|
||||||
valeurs[i+offset] = 0;
|
case FTransfer.log:
|
||||||
break;
|
break;
|
||||||
case FTransfer.log:
|
case FTransfer.exp:
|
||||||
break;
|
break;
|
||||||
case FTransfer.exp:
|
default:
|
||||||
break;
|
throw new ArgumentOutOfRangeException ();
|
||||||
default:
|
}
|
||||||
throw new ArgumentOutOfRangeException ();
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
valeurs[i+offset] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,8 @@ namespace DMX2
|
||||||
private global::Gtk.Button btnGoBack;
|
private global::Gtk.Button btnGoBack;
|
||||||
private global::Gtk.Button btnAjoutLigne;
|
private global::Gtk.Button btnAjoutLigne;
|
||||||
private global::Gtk.Button btnRetireLigne;
|
private global::Gtk.Button btnRetireLigne;
|
||||||
private global::Gtk.ToggleButton togglebutton2;
|
private global::Gtk.ToggleButton btnBlackOut;
|
||||||
private global::Gtk.ToggleButton togglebutton1;
|
private global::Gtk.ToggleButton btnPause;
|
||||||
private global::Gtk.ToggleButton togglebutton3;
|
private global::Gtk.ToggleButton togglebutton3;
|
||||||
private global::Gtk.Label timeLabel;
|
private global::Gtk.Label timeLabel;
|
||||||
private global::Gtk.VScale masterScale;
|
private global::Gtk.VScale masterScale;
|
||||||
|
|
@ -220,11 +220,11 @@ namespace DMX2
|
||||||
w37.Expand = false;
|
w37.Expand = false;
|
||||||
w37.Fill = false;
|
w37.Fill = false;
|
||||||
// Container child vbox2.Gtk.Box+BoxChild
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
this.togglebutton2 = new global::Gtk.ToggleButton ();
|
this.btnBlackOut = new global::Gtk.ToggleButton ();
|
||||||
this.togglebutton2.CanFocus = true;
|
this.btnBlackOut.CanFocus = true;
|
||||||
this.togglebutton2.Name = "togglebutton2";
|
this.btnBlackOut.Name = "btnBlackOut";
|
||||||
this.togglebutton2.UseUnderline = true;
|
this.btnBlackOut.UseUnderline = true;
|
||||||
// Container child togglebutton2.Gtk.Container+ContainerChild
|
// Container child btnBlackOut.Gtk.Container+ContainerChild
|
||||||
global::Gtk.Alignment w38 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
|
global::Gtk.Alignment w38 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
|
||||||
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
||||||
global::Gtk.HBox w39 = new global::Gtk.HBox ();
|
global::Gtk.HBox w39 = new global::Gtk.HBox ();
|
||||||
|
|
@ -237,18 +237,18 @@ namespace DMX2
|
||||||
global::Gtk.Label w42 = new global::Gtk.Label ();
|
global::Gtk.Label w42 = new global::Gtk.Label ();
|
||||||
w39.Add (w42);
|
w39.Add (w42);
|
||||||
w38.Add (w39);
|
w38.Add (w39);
|
||||||
this.togglebutton2.Add (w38);
|
this.btnBlackOut.Add (w38);
|
||||||
this.vbox2.Add (this.togglebutton2);
|
this.vbox2.Add (this.btnBlackOut);
|
||||||
global::Gtk.Box.BoxChild w46 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.togglebutton2]));
|
global::Gtk.Box.BoxChild w46 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnBlackOut]));
|
||||||
w46.Position = 4;
|
w46.Position = 4;
|
||||||
w46.Expand = false;
|
w46.Expand = false;
|
||||||
w46.Fill = false;
|
w46.Fill = false;
|
||||||
// Container child vbox2.Gtk.Box+BoxChild
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
this.togglebutton1 = new global::Gtk.ToggleButton ();
|
this.btnPause = new global::Gtk.ToggleButton ();
|
||||||
this.togglebutton1.CanFocus = true;
|
this.btnPause.CanFocus = true;
|
||||||
this.togglebutton1.Name = "togglebutton1";
|
this.btnPause.Name = "btnPause";
|
||||||
this.togglebutton1.UseUnderline = true;
|
this.btnPause.UseUnderline = true;
|
||||||
// Container child togglebutton1.Gtk.Container+ContainerChild
|
// Container child btnPause.Gtk.Container+ContainerChild
|
||||||
global::Gtk.Alignment w47 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
|
global::Gtk.Alignment w47 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
|
||||||
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
||||||
global::Gtk.HBox w48 = new global::Gtk.HBox ();
|
global::Gtk.HBox w48 = new global::Gtk.HBox ();
|
||||||
|
|
@ -261,9 +261,9 @@ namespace DMX2
|
||||||
global::Gtk.Label w51 = new global::Gtk.Label ();
|
global::Gtk.Label w51 = new global::Gtk.Label ();
|
||||||
w48.Add (w51);
|
w48.Add (w51);
|
||||||
w47.Add (w48);
|
w47.Add (w48);
|
||||||
this.togglebutton1.Add (w47);
|
this.btnPause.Add (w47);
|
||||||
this.vbox2.Add (this.togglebutton1);
|
this.vbox2.Add (this.btnPause);
|
||||||
global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.togglebutton1]));
|
global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnPause]));
|
||||||
w55.Position = 5;
|
w55.Position = 5;
|
||||||
w55.Expand = false;
|
w55.Expand = false;
|
||||||
w55.Fill = false;
|
w55.Fill = false;
|
||||||
|
|
@ -306,7 +306,7 @@ namespace DMX2
|
||||||
w65.Padding = ((uint)(10));
|
w65.Padding = ((uint)(10));
|
||||||
// Container child vbox2.Gtk.Box+BoxChild
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
this.masterScale = new global::Gtk.VScale (null);
|
this.masterScale = new global::Gtk.VScale (null);
|
||||||
this.masterScale.HeightRequest = 150;
|
this.masterScale.HeightRequest = 75;
|
||||||
this.masterScale.Name = "masterScale";
|
this.masterScale.Name = "masterScale";
|
||||||
this.masterScale.Inverted = true;
|
this.masterScale.Inverted = true;
|
||||||
this.masterScale.Adjustment.Upper = 100;
|
this.masterScale.Adjustment.Upper = 100;
|
||||||
|
|
@ -319,8 +319,6 @@ namespace DMX2
|
||||||
this.vbox2.Add (this.masterScale);
|
this.vbox2.Add (this.masterScale);
|
||||||
global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.masterScale]));
|
global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.masterScale]));
|
||||||
w66.Position = 8;
|
w66.Position = 8;
|
||||||
w66.Expand = false;
|
|
||||||
w66.Fill = false;
|
|
||||||
this.hbox1.Add (this.vbox2);
|
this.hbox1.Add (this.vbox2);
|
||||||
global::Gtk.Box.BoxChild w67 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2]));
|
global::Gtk.Box.BoxChild w67 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2]));
|
||||||
w67.Position = 0;
|
w67.Position = 0;
|
||||||
|
|
@ -460,6 +458,8 @@ namespace DMX2
|
||||||
this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked);
|
this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked);
|
||||||
this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked);
|
this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked);
|
||||||
this.btnRetireLigne.Clicked += new global::System.EventHandler (this.OnBtnRetireLigneClicked);
|
this.btnRetireLigne.Clicked += new global::System.EventHandler (this.OnBtnRetireLigneClicked);
|
||||||
|
this.btnBlackOut.Toggled += new global::System.EventHandler (this.OnBtnBlackOutToggled);
|
||||||
|
this.btnPause.Toggled += new global::System.EventHandler (this.OnBtnPauseToggled);
|
||||||
this.masterScale.ValueChanged += new global::System.EventHandler (this.OnMasterScaleValueChanged);
|
this.masterScale.ValueChanged += new global::System.EventHandler (this.OnMasterScaleValueChanged);
|
||||||
this.MatriceUI.CursorChanged += new global::System.EventHandler (this.OnMatriceUICursorChanged);
|
this.MatriceUI.CursorChanged += new global::System.EventHandler (this.OnMatriceUICursorChanged);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ namespace DMX2
|
||||||
private global::Gtk.Action goBackAction;
|
private global::Gtk.Action goBackAction;
|
||||||
private global::Gtk.Action mediaPauseAction;
|
private global::Gtk.Action mediaPauseAction;
|
||||||
private global::Gtk.Action mediaNextAction;
|
private global::Gtk.Action mediaNextAction;
|
||||||
|
private global::Gtk.Action btnAjoutLigne;
|
||||||
|
private global::Gtk.Action btnRetireligne;
|
||||||
private global::Gtk.Frame frame1;
|
private global::Gtk.Frame frame1;
|
||||||
private global::Gtk.Alignment GtkAlignment;
|
private global::Gtk.Alignment GtkAlignment;
|
||||||
private global::Gtk.Alignment alignment1;
|
private global::Gtk.Alignment alignment1;
|
||||||
|
|
@ -19,13 +21,15 @@ namespace DMX2
|
||||||
private global::Gtk.VBox vbox3;
|
private global::Gtk.VBox vbox3;
|
||||||
private global::Gtk.HBox hbox2;
|
private global::Gtk.HBox hbox2;
|
||||||
private global::Gtk.Label posLabel;
|
private global::Gtk.Label posLabel;
|
||||||
private global::Gtk.Label label56;
|
private global::Gtk.Label timeLabel;
|
||||||
private global::Gtk.HScale seqMasterScale;
|
private global::Gtk.HScale seqMasterScale;
|
||||||
private global::Gtk.ProgressBar pbTrans;
|
private global::Gtk.HBox hbox3;
|
||||||
private global::Gtk.Toolbar toolbar2;
|
private global::Gtk.Entry txtCommand;
|
||||||
|
private global::Gtk.Button btnCommand;
|
||||||
|
private global::Gtk.Toolbar toolbar;
|
||||||
private global::Gtk.Toolbar toolbar1;
|
private global::Gtk.Toolbar toolbar1;
|
||||||
private global::Gtk.ScrolledWindow scrolledwindow1;
|
private global::Gtk.ScrolledWindow scrolledwindow1;
|
||||||
private global::Gtk.TreeView MatriceUI;
|
private global::Gtk.TreeView effetsListe;
|
||||||
private global::Gtk.Label titreLabel;
|
private global::Gtk.Label titreLabel;
|
||||||
|
|
||||||
protected virtual void Build ()
|
protected virtual void Build ()
|
||||||
|
|
@ -48,6 +52,10 @@ namespace DMX2
|
||||||
w2.Add (this.mediaPauseAction, null);
|
w2.Add (this.mediaPauseAction, null);
|
||||||
this.mediaNextAction = new global::Gtk.Action ("mediaNextAction", null, null, "gtk-media-next");
|
this.mediaNextAction = new global::Gtk.Action ("mediaNextAction", null, null, "gtk-media-next");
|
||||||
w2.Add (this.mediaNextAction, null);
|
w2.Add (this.mediaNextAction, null);
|
||||||
|
this.btnAjoutLigne = new global::Gtk.Action ("btnAjoutLigne", null, null, "gtk-add");
|
||||||
|
w2.Add (this.btnAjoutLigne, null);
|
||||||
|
this.btnRetireligne = new global::Gtk.Action ("btnRetireligne", null, null, "gtk-remove");
|
||||||
|
w2.Add (this.btnRetireligne, null);
|
||||||
this.UIManager.InsertActionGroup (w2, 0);
|
this.UIManager.InsertActionGroup (w2, 0);
|
||||||
this.Name = "DMX2.SeqMacroUI";
|
this.Name = "DMX2.SeqMacroUI";
|
||||||
// Container child DMX2.SeqMacroUI.Gtk.Container+ContainerChild
|
// Container child DMX2.SeqMacroUI.Gtk.Container+ContainerChild
|
||||||
|
|
@ -88,13 +96,13 @@ namespace DMX2
|
||||||
w3.Expand = false;
|
w3.Expand = false;
|
||||||
w3.Fill = false;
|
w3.Fill = false;
|
||||||
// Container child hbox2.Gtk.Box+BoxChild
|
// Container child hbox2.Gtk.Box+BoxChild
|
||||||
this.label56 = new global::Gtk.Label ();
|
this.timeLabel = new global::Gtk.Label ();
|
||||||
this.label56.Name = "label56";
|
this.timeLabel.Name = "timeLabel";
|
||||||
this.label56.Xpad = 10;
|
this.timeLabel.Xpad = 10;
|
||||||
this.label56.LabelProp = global::Mono.Unix.Catalog.GetString ("<big>00.0</big>");
|
this.timeLabel.LabelProp = global::Mono.Unix.Catalog.GetString ("<big>00.0</big>");
|
||||||
this.label56.UseMarkup = true;
|
this.timeLabel.UseMarkup = true;
|
||||||
this.hbox2.Add (this.label56);
|
this.hbox2.Add (this.timeLabel);
|
||||||
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label56]));
|
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.timeLabel]));
|
||||||
w4.PackType = ((global::Gtk.PackType)(1));
|
w4.PackType = ((global::Gtk.PackType)(1));
|
||||||
w4.Position = 1;
|
w4.Position = 1;
|
||||||
w4.Expand = false;
|
w4.Expand = false;
|
||||||
|
|
@ -121,29 +129,62 @@ namespace DMX2
|
||||||
w6.Expand = false;
|
w6.Expand = false;
|
||||||
w6.Fill = false;
|
w6.Fill = false;
|
||||||
// Container child vbox3.Gtk.Box+BoxChild
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
this.pbTrans = new global::Gtk.ProgressBar ();
|
this.hbox3 = new global::Gtk.HBox ();
|
||||||
this.pbTrans.HeightRequest = 15;
|
this.hbox3.Name = "hbox3";
|
||||||
this.pbTrans.Name = "pbTrans";
|
this.hbox3.Spacing = 6;
|
||||||
this.vbox3.Add (this.pbTrans);
|
// Container child hbox3.Gtk.Box+BoxChild
|
||||||
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.pbTrans]));
|
this.txtCommand = new global::Gtk.Entry ();
|
||||||
w7.Position = 2;
|
this.txtCommand.CanFocus = true;
|
||||||
w7.Expand = false;
|
this.txtCommand.Name = "txtCommand";
|
||||||
w7.Fill = false;
|
this.txtCommand.IsEditable = true;
|
||||||
|
this.txtCommand.InvisibleChar = '●';
|
||||||
|
this.hbox3.Add (this.txtCommand);
|
||||||
|
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.txtCommand]));
|
||||||
|
w7.Position = 0;
|
||||||
|
// Container child hbox3.Gtk.Box+BoxChild
|
||||||
|
this.btnCommand = new global::Gtk.Button ();
|
||||||
|
this.btnCommand.CanFocus = true;
|
||||||
|
this.btnCommand.Name = "btnCommand";
|
||||||
|
this.btnCommand.UseUnderline = true;
|
||||||
|
// Container child btnCommand.Gtk.Container+ContainerChild
|
||||||
|
global::Gtk.Alignment w8 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
|
||||||
|
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
||||||
|
global::Gtk.HBox w9 = new global::Gtk.HBox ();
|
||||||
|
w9.Spacing = 2;
|
||||||
|
// Container child GtkHBox.Gtk.Container+ContainerChild
|
||||||
|
global::Gtk.Image w10 = new global::Gtk.Image ();
|
||||||
|
w10.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-ok", global::Gtk.IconSize.Menu);
|
||||||
|
w9.Add (w10);
|
||||||
|
// Container child GtkHBox.Gtk.Container+ContainerChild
|
||||||
|
global::Gtk.Label w12 = new global::Gtk.Label ();
|
||||||
|
w12.LabelProp = global::Mono.Unix.Catalog.GetString ("Ok");
|
||||||
|
w12.UseUnderline = true;
|
||||||
|
w9.Add (w12);
|
||||||
|
w8.Add (w9);
|
||||||
|
this.btnCommand.Add (w8);
|
||||||
|
this.hbox3.Add (this.btnCommand);
|
||||||
|
global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnCommand]));
|
||||||
|
w16.Position = 1;
|
||||||
|
w16.Expand = false;
|
||||||
|
w16.Fill = false;
|
||||||
|
this.vbox3.Add (this.hbox3);
|
||||||
|
global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox3]));
|
||||||
|
w17.Position = 2;
|
||||||
|
w17.Expand = false;
|
||||||
|
w17.Fill = false;
|
||||||
// Container child vbox3.Gtk.Box+BoxChild
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar2'><toolitem name='goForwardAction' action='goForwardAction'/><toolitem name='goBackAction' action='goBackAction'/><toolitem name='mediaPauseAction' action='mediaPauseAction'/><toolitem name='mediaNextAction' action='mediaNextAction'/></toolbar></ui>");
|
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar'><toolitem name='goForwardAction' action='goForwardAction'/><toolitem name='goBackAction' action='goBackAction'/><toolitem name='mediaPauseAction' action='mediaPauseAction'/><toolitem name='btnAjoutLigne' action='btnAjoutLigne'/><toolitem name='btnRetireligne' action='btnRetireligne'/></toolbar></ui>");
|
||||||
this.toolbar2 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar2")));
|
this.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar")));
|
||||||
this.toolbar2.Name = "toolbar2";
|
this.toolbar.Name = "toolbar";
|
||||||
this.toolbar2.ShowArrow = false;
|
this.toolbar.ShowArrow = false;
|
||||||
this.vbox3.Add (this.toolbar2);
|
this.vbox3.Add (this.toolbar);
|
||||||
global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.toolbar2]));
|
global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.toolbar]));
|
||||||
w8.Position = 3;
|
w18.Position = 3;
|
||||||
w8.Expand = false;
|
w18.Expand = false;
|
||||||
w8.Fill = false;
|
w18.Fill = false;
|
||||||
this.hbox1.Add (this.vbox3);
|
this.hbox1.Add (this.vbox3);
|
||||||
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
|
global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
|
||||||
w9.Position = 0;
|
w19.Position = 0;
|
||||||
w9.Expand = false;
|
|
||||||
w9.Fill = false;
|
|
||||||
// Container child hbox1.Gtk.Box+BoxChild
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar1'><toolitem name='closeAction' action='closeAction'/><toolitem name='circuitsAction' action='circuitsAction'/></toolbar></ui>");
|
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar1'><toolitem name='closeAction' action='closeAction'/><toolitem name='circuitsAction' action='circuitsAction'/></toolbar></ui>");
|
||||||
this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar1")));
|
this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar1")));
|
||||||
|
|
@ -153,29 +194,29 @@ namespace DMX2
|
||||||
this.toolbar1.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
this.toolbar1.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||||
this.toolbar1.IconSize = ((global::Gtk.IconSize)(2));
|
this.toolbar1.IconSize = ((global::Gtk.IconSize)(2));
|
||||||
this.hbox1.Add (this.toolbar1);
|
this.hbox1.Add (this.toolbar1);
|
||||||
global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar1]));
|
global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar1]));
|
||||||
w10.PackType = ((global::Gtk.PackType)(1));
|
w20.PackType = ((global::Gtk.PackType)(1));
|
||||||
w10.Position = 1;
|
w20.Position = 1;
|
||||||
w10.Expand = false;
|
w20.Expand = false;
|
||||||
w10.Fill = false;
|
w20.Fill = false;
|
||||||
this.vbox2.Add (this.hbox1);
|
this.vbox2.Add (this.hbox1);
|
||||||
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
|
global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
|
||||||
w11.Position = 0;
|
w21.Position = 0;
|
||||||
w11.Expand = false;
|
w21.Expand = false;
|
||||||
w11.Fill = false;
|
w21.Fill = false;
|
||||||
// Container child vbox2.Gtk.Box+BoxChild
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
|
this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
|
||||||
this.scrolledwindow1.CanFocus = true;
|
this.scrolledwindow1.CanFocus = true;
|
||||||
this.scrolledwindow1.Name = "scrolledwindow1";
|
this.scrolledwindow1.Name = "scrolledwindow1";
|
||||||
this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
|
this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
|
||||||
// Container child scrolledwindow1.Gtk.Container+ContainerChild
|
// Container child scrolledwindow1.Gtk.Container+ContainerChild
|
||||||
this.MatriceUI = new global::Gtk.TreeView ();
|
this.effetsListe = new global::Gtk.TreeView ();
|
||||||
this.MatriceUI.CanFocus = true;
|
this.effetsListe.CanFocus = true;
|
||||||
this.MatriceUI.Name = "MatriceUI";
|
this.effetsListe.Name = "effetsListe";
|
||||||
this.scrolledwindow1.Add (this.MatriceUI);
|
this.scrolledwindow1.Add (this.effetsListe);
|
||||||
this.vbox2.Add (this.scrolledwindow1);
|
this.vbox2.Add (this.scrolledwindow1);
|
||||||
global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.scrolledwindow1]));
|
global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.scrolledwindow1]));
|
||||||
w13.Position = 1;
|
w23.Position = 1;
|
||||||
this.alignment1.Add (this.vbox2);
|
this.alignment1.Add (this.vbox2);
|
||||||
this.GtkAlignment.Add (this.alignment1);
|
this.GtkAlignment.Add (this.alignment1);
|
||||||
this.frame1.Add (this.GtkAlignment);
|
this.frame1.Add (this.GtkAlignment);
|
||||||
|
|
@ -192,6 +233,14 @@ namespace DMX2
|
||||||
this.Hide ();
|
this.Hide ();
|
||||||
this.closeAction.Activated += new global::System.EventHandler (this.OnCloseActionActivated);
|
this.closeAction.Activated += new global::System.EventHandler (this.OnCloseActionActivated);
|
||||||
this.circuitsAction.Activated += new global::System.EventHandler (this.OnCircuitsActionActivated);
|
this.circuitsAction.Activated += new global::System.EventHandler (this.OnCircuitsActionActivated);
|
||||||
|
this.goForwardAction.Activated += new global::System.EventHandler (this.OnGoForwardActionActivated);
|
||||||
|
this.goBackAction.Activated += new global::System.EventHandler (this.OnGoBackActionActivated);
|
||||||
|
this.mediaPauseAction.Activated += new global::System.EventHandler (this.OnMediaPauseActionActivated);
|
||||||
|
this.btnAjoutLigne.Activated += new global::System.EventHandler (this.OnBtnAjoutLigneActivated);
|
||||||
|
this.btnRetireligne.Activated += new global::System.EventHandler (this.OnRemoveLigneActivated);
|
||||||
|
this.seqMasterScale.ValueChanged += new global::System.EventHandler (this.OnSeqMasterScaleValueChanged);
|
||||||
|
this.btnCommand.Clicked += new global::System.EventHandler (this.OnBtnCommandClicked);
|
||||||
|
this.effetsListe.CursorChanged += new global::System.EventHandler (this.OnEffetsListeCursorChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -264,13 +264,14 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.ToggleButton" id="togglebutton2">
|
<widget class="Gtk.ToggleButton" id="btnBlackOut">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="CanFocus">True</property>
|
<property name="CanFocus">True</property>
|
||||||
<property name="Type">TextAndIcon</property>
|
<property name="Type">TextAndIcon</property>
|
||||||
<property name="Icon">stock:gtk-no Dnd</property>
|
<property name="Icon">stock:gtk-no Dnd</property>
|
||||||
<property name="Label" translatable="yes" />
|
<property name="Label" translatable="yes" />
|
||||||
<property name="UseUnderline">True</property>
|
<property name="UseUnderline">True</property>
|
||||||
|
<signal name="Toggled" handler="OnBtnBlackOutToggled" />
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">4</property>
|
<property name="Position">4</property>
|
||||||
|
|
@ -280,13 +281,14 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.ToggleButton" id="togglebutton1">
|
<widget class="Gtk.ToggleButton" id="btnPause">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="CanFocus">True</property>
|
<property name="CanFocus">True</property>
|
||||||
<property name="Type">TextAndIcon</property>
|
<property name="Type">TextAndIcon</property>
|
||||||
<property name="Icon">stock:gtk-media-pause Dnd</property>
|
<property name="Icon">stock:gtk-media-pause Dnd</property>
|
||||||
<property name="Label" translatable="yes" />
|
<property name="Label" translatable="yes" />
|
||||||
<property name="UseUnderline">True</property>
|
<property name="UseUnderline">True</property>
|
||||||
|
<signal name="Toggled" handler="OnBtnPauseToggled" />
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">5</property>
|
<property name="Position">5</property>
|
||||||
|
|
@ -330,7 +332,7 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.VScale" id="masterScale">
|
<widget class="Gtk.VScale" id="masterScale">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="HeightRequest">150</property>
|
<property name="HeightRequest">75</property>
|
||||||
<property name="Inverted">True</property>
|
<property name="Inverted">True</property>
|
||||||
<property name="Upper">100</property>
|
<property name="Upper">100</property>
|
||||||
<property name="PageIncrement">10</property>
|
<property name="PageIncrement">10</property>
|
||||||
|
|
@ -344,8 +346,6 @@
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">8</property>
|
<property name="Position">8</property>
|
||||||
<property name="AutoSize">False</property>
|
<property name="AutoSize">False</property>
|
||||||
<property name="Expand">False</property>
|
|
||||||
<property name="Fill">False</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
@ -1538,7 +1538,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="Gtk.Bin" id="DMX2.SeqMacroUI" design-size="511 468">
|
<widget class="Gtk.Bin" id="DMX2.SeqMacroUI" design-size="665 467">
|
||||||
<action-group name="Default">
|
<action-group name="Default">
|
||||||
<action id="closeAction">
|
<action id="closeAction">
|
||||||
<property name="Type">Toggle</property>
|
<property name="Type">Toggle</property>
|
||||||
|
|
@ -1559,22 +1559,37 @@
|
||||||
<property name="Type">Action</property>
|
<property name="Type">Action</property>
|
||||||
<property name="Label" translatable="yes" />
|
<property name="Label" translatable="yes" />
|
||||||
<property name="StockId">gtk-go-forward</property>
|
<property name="StockId">gtk-go-forward</property>
|
||||||
|
<signal name="Activated" handler="OnGoForwardActionActivated" />
|
||||||
</action>
|
</action>
|
||||||
<action id="goBackAction">
|
<action id="goBackAction">
|
||||||
<property name="Type">Action</property>
|
<property name="Type">Action</property>
|
||||||
<property name="Label" translatable="yes" />
|
<property name="Label" translatable="yes" />
|
||||||
<property name="StockId">gtk-go-back</property>
|
<property name="StockId">gtk-go-back</property>
|
||||||
|
<signal name="Activated" handler="OnGoBackActionActivated" />
|
||||||
</action>
|
</action>
|
||||||
<action id="mediaPauseAction">
|
<action id="mediaPauseAction">
|
||||||
<property name="Type">Action</property>
|
<property name="Type">Action</property>
|
||||||
<property name="Label" translatable="yes" />
|
<property name="Label" translatable="yes" />
|
||||||
<property name="StockId">gtk-media-pause</property>
|
<property name="StockId">gtk-media-pause</property>
|
||||||
|
<signal name="Activated" handler="OnMediaPauseActionActivated" />
|
||||||
</action>
|
</action>
|
||||||
<action id="mediaNextAction">
|
<action id="mediaNextAction">
|
||||||
<property name="Type">Action</property>
|
<property name="Type">Action</property>
|
||||||
<property name="Label" translatable="yes" />
|
<property name="Label" translatable="yes" />
|
||||||
<property name="StockId">gtk-media-next</property>
|
<property name="StockId">gtk-media-next</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action id="btnAjoutLigne">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="StockId">gtk-add</property>
|
||||||
|
<signal name="Activated" handler="OnBtnAjoutLigneActivated" />
|
||||||
|
</action>
|
||||||
|
<action id="btnRetireligne">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="StockId">gtk-remove</property>
|
||||||
|
<signal name="Activated" handler="OnRemoveLigneActivated" />
|
||||||
|
</action>
|
||||||
</action-group>
|
</action-group>
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="Visible">False</property>
|
<property name="Visible">False</property>
|
||||||
|
|
@ -1621,7 +1636,7 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.Label" id="label56">
|
<widget class="Gtk.Label" id="timeLabel">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="Xpad">10</property>
|
<property name="Xpad">10</property>
|
||||||
<property name="LabelProp" translatable="yes"><big>00.0</big></property>
|
<property name="LabelProp" translatable="yes"><big>00.0</big></property>
|
||||||
|
|
@ -1654,6 +1669,7 @@
|
||||||
<property name="DrawValue">True</property>
|
<property name="DrawValue">True</property>
|
||||||
<property name="Digits">0</property>
|
<property name="Digits">0</property>
|
||||||
<property name="ValuePos">Right</property>
|
<property name="ValuePos">Right</property>
|
||||||
|
<signal name="ValueChanged" handler="OnSeqMasterScaleValueChanged" />
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">1</property>
|
<property name="Position">1</property>
|
||||||
|
|
@ -1663,9 +1679,38 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.ProgressBar" id="pbTrans">
|
<widget class="Gtk.HBox" id="hbox3">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="HeightRequest">15</property>
|
<property name="Spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Entry" id="txtCommand">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="IsEditable">True</property>
|
||||||
|
<property name="InvisibleChar">●</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Button" id="btnCommand">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="Type">TextAndIcon</property>
|
||||||
|
<property name="Icon">stock:gtk-ok Menu</property>
|
||||||
|
<property name="Label" translatable="yes">Ok</property>
|
||||||
|
<property name="UseUnderline">True</property>
|
||||||
|
<signal name="Clicked" handler="OnBtnCommandClicked" />
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">2</property>
|
<property name="Position">2</property>
|
||||||
|
|
@ -1675,14 +1720,15 @@
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.Toolbar" id="toolbar2">
|
<widget class="Gtk.Toolbar" id="toolbar">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="ShowArrow">False</property>
|
<property name="ShowArrow">False</property>
|
||||||
<node name="__gtksharp_66_Stetic_Editor_ActionToolbar" type="Toolbar">
|
<node name="toolbar" type="Toolbar">
|
||||||
<node type="Toolitem" action="goForwardAction" />
|
<node type="Toolitem" action="goForwardAction" />
|
||||||
<node type="Toolitem" action="goBackAction" />
|
<node type="Toolitem" action="goBackAction" />
|
||||||
<node type="Toolitem" action="mediaPauseAction" />
|
<node type="Toolitem" action="mediaPauseAction" />
|
||||||
<node type="Toolitem" action="mediaNextAction" />
|
<node type="Toolitem" action="btnAjoutLigne" />
|
||||||
|
<node type="Toolitem" action="btnRetireligne" />
|
||||||
</node>
|
</node>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
|
@ -1695,9 +1741,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">0</property>
|
<property name="Position">0</property>
|
||||||
<property name="AutoSize">True</property>
|
<property name="AutoSize">False</property>
|
||||||
<property name="Expand">False</property>
|
|
||||||
<property name="Fill">False</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
|
@ -1707,7 +1751,7 @@
|
||||||
<property name="ShowArrow">False</property>
|
<property name="ShowArrow">False</property>
|
||||||
<property name="ButtonStyle">Icons</property>
|
<property name="ButtonStyle">Icons</property>
|
||||||
<property name="IconSize">SmallToolbar</property>
|
<property name="IconSize">SmallToolbar</property>
|
||||||
<node name="__gtksharp_66_Stetic_Editor_ActionToolbar" type="Toolbar">
|
<node name="toolbar1" type="Toolbar">
|
||||||
<node type="Toolitem" action="closeAction" />
|
<node type="Toolitem" action="closeAction" />
|
||||||
<node type="Toolitem" action="circuitsAction" />
|
<node type="Toolitem" action="circuitsAction" />
|
||||||
</node>
|
</node>
|
||||||
|
|
@ -1734,9 +1778,10 @@
|
||||||
<property name="CanFocus">True</property>
|
<property name="CanFocus">True</property>
|
||||||
<property name="ShadowType">In</property>
|
<property name="ShadowType">In</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.TreeView" id="MatriceUI">
|
<widget class="Gtk.TreeView" id="effetsListe">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="CanFocus">True</property>
|
<property name="CanFocus">True</property>
|
||||||
|
<signal name="CursorChanged" handler="OnEffetsListeCursorChanged" />
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue