Copie Seq Macro -> Seq Midi
This commit is contained in:
parent
9607f81f36
commit
acd01db3fc
6 changed files with 1826 additions and 48 deletions
|
|
@ -137,6 +137,9 @@
|
||||||
<Compile Include="gtk-gui\DMX2.SeqSonUI.cs" />
|
<Compile Include="gtk-gui\DMX2.SeqSonUI.cs" />
|
||||||
<Compile Include="OSCServer.cs" />
|
<Compile Include="OSCServer.cs" />
|
||||||
<Compile Include="WebServer.cs" />
|
<Compile Include="WebServer.cs" />
|
||||||
|
<Compile Include="SequenceurMidi.cs" />
|
||||||
|
<Compile Include="SeqMidiUI.cs" />
|
||||||
|
<Compile Include="gtk-gui\DMX2.SeqMidiUI.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
|
|
@ -150,4 +153,4 @@
|
||||||
</Properties>
|
</Properties>
|
||||||
</MonoDevelop>
|
</MonoDevelop>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
456
DMX-2.0/SeqMidiUI.cs
Normal file
456
DMX-2.0/SeqMidiUI.cs
Normal file
|
|
@ -0,0 +1,456 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (C) Arnaud Houdelette 2012-2014
|
||||||
|
Copyright (C) Emmanuel Langlois 2012-2014
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Gtk;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace DMX2
|
||||||
|
{
|
||||||
|
[System.ComponentModel.ToolboxItem(true)]
|
||||||
|
public partial class SeqMidiUI : SequenceurUI
|
||||||
|
{
|
||||||
|
bool fullUpdFlag = true;
|
||||||
|
bool updating;
|
||||||
|
SequenceurMidi sequenceur; /* pointe sur les données */
|
||||||
|
ListStore lsEffets=null; /* liste des effets */
|
||||||
|
//TreeViewColumn nomCol; /* inutile dans le contexte macro */
|
||||||
|
|
||||||
|
bool effetChange = false;
|
||||||
|
public void EffetChange ()
|
||||||
|
{
|
||||||
|
effetChange = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime nextMaj = DateTime.Now;
|
||||||
|
|
||||||
|
void RenamePopup (object sender, ContextMenuEventArgs e)
|
||||||
|
{
|
||||||
|
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 idCell = new Gtk.CellRendererText ();
|
||||||
|
|
||||||
|
idCol.Title = "Num";
|
||||||
|
idCol.PackStart (idCell, true);
|
||||||
|
idCol.SetCellDataFunc (idCell, new Gtk.TreeCellDataFunc (RenderMatriceNum));
|
||||||
|
effetsListe.AppendColumn (idCol);
|
||||||
|
|
||||||
|
|
||||||
|
var nomCol = new Gtk.TreeViewColumn ();
|
||||||
|
var nomCell = new Gtk.CellRendererText ();
|
||||||
|
nomCol.Title = "Nom";
|
||||||
|
nomCol.PackStart (nomCell, true);
|
||||||
|
nomCol.SetCellDataFunc (nomCell, new Gtk.TreeCellDataFunc (RenderMatriceNom));
|
||||||
|
nomCol.Resizable = true;
|
||||||
|
nomCell.Editable = true;
|
||||||
|
nomCell.Edited += OnNomCellEdited;
|
||||||
|
effetsListe.AppendColumn (nomCol);
|
||||||
|
|
||||||
|
var topCol = new Gtk.TreeViewColumn ();
|
||||||
|
var topCell = new Gtk.CellRendererText ();
|
||||||
|
topCol.Title = "Top";
|
||||||
|
topCol.PackStart (topCell, true);
|
||||||
|
topCol.SetCellDataFunc (topCell, new Gtk.TreeCellDataFunc (RenderMatriceTop));
|
||||||
|
topCell.Editable = true;
|
||||||
|
topCell.Edited += OnTopCellEdited;
|
||||||
|
effetsListe.AppendColumn (topCol);
|
||||||
|
|
||||||
|
var circuitsCol = new Gtk.TreeViewColumn ();
|
||||||
|
var circuitsCell = new Gtk.CellRendererText ();
|
||||||
|
circuitsCol.Title = "Circuits";
|
||||||
|
circuitsCol.PackStart (circuitsCell, true);
|
||||||
|
circuitsCol.SetCellDataFunc (circuitsCell, new Gtk.TreeCellDataFunc (RenderMatriceCircuits));
|
||||||
|
circuitsCol.Resizable = true;
|
||||||
|
circuitsCell.Editable = true;
|
||||||
|
circuitsCell.Edited += OnCircuitsCellEdited;
|
||||||
|
effetsListe.AppendColumn (circuitsCol);
|
||||||
|
|
||||||
|
var valeurCol = new Gtk.TreeViewColumn ();
|
||||||
|
var valeurCell = new Gtk.CellRendererText ();
|
||||||
|
valeurCol.Title = "Valeur";
|
||||||
|
valeurCol.PackStart (valeurCell, true);
|
||||||
|
valeurCol.SetCellDataFunc (valeurCell, new Gtk.TreeCellDataFunc (RenderMatriceValeur));
|
||||||
|
valeurCell.Editable = true;
|
||||||
|
valeurCell.Edited += OnValeurCellEdited;
|
||||||
|
effetsListe.AppendColumn (valeurCol);
|
||||||
|
|
||||||
|
var tempsCol = new Gtk.TreeViewColumn ();
|
||||||
|
var tempsCell = new Gtk.CellRendererText ();
|
||||||
|
tempsCol.Title = "Temps";
|
||||||
|
tempsCol.PackStart (tempsCell, true);
|
||||||
|
tempsCol.SetCellDataFunc (tempsCell, new Gtk.TreeCellDataFunc (RenderMatriceTemps));
|
||||||
|
tempsCell.Editable = true;
|
||||||
|
tempsCell.Edited += OnTempsCellEdited;
|
||||||
|
effetsListe.AppendColumn (tempsCol);
|
||||||
|
|
||||||
|
lsEffets = new Gtk.ListStore(typeof (SequenceurMacro.Ligne));
|
||||||
|
this.effetsListe.Model = lsEffets;
|
||||||
|
UpdListeEffets();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderMatriceNum (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
if (Conduite.Courante==null) return;
|
||||||
|
string num=string.Empty;
|
||||||
|
SequenceurMidi.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMidi.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();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
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 SeqMidiUI (SequenceurMidi s ) : base (s)
|
||||||
|
{
|
||||||
|
this.Build ();
|
||||||
|
titreLabel.Text = s.Name;
|
||||||
|
sequenceur = s;
|
||||||
|
ConstruitMatrice ();
|
||||||
|
|
||||||
|
|
||||||
|
new ContextMenuHelper(seqMasterScale,MasterPopup);
|
||||||
|
new ContextMenuHelper(frame1,RenamePopup);
|
||||||
|
new ContextMenuHelper(evBBox,CompteurPopup);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void MasterPopup (object sender, ContextMenuEventArgs e)
|
||||||
|
{
|
||||||
|
Menu m = Conduite.Courante.EventManager.GetMenu(null,
|
||||||
|
delegate(object o,string eventId){
|
||||||
|
sequenceur.BindMasterEvent(eventId);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
m.ShowAll();
|
||||||
|
m.Popup();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompteurPopup (object sender, ContextMenuEventArgs e)
|
||||||
|
{
|
||||||
|
Menu m = new Menu();
|
||||||
|
|
||||||
|
MenuItem item = new MenuItem("Effet Suivant");
|
||||||
|
m.Add(item);
|
||||||
|
item.Submenu = Conduite.Courante.EventManager.GetMenu(null,
|
||||||
|
delegate(object o,string eventId){
|
||||||
|
sequenceur.BindEffetSuivantEvent(eventId);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
item = new MenuItem("Effet Precedent");
|
||||||
|
m.Add(item);
|
||||||
|
item.Submenu = Conduite.Courante.EventManager.GetMenu(null,
|
||||||
|
delegate(object o,string eventId){
|
||||||
|
sequenceur.BindEffetPrecedentEvent(eventId);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
m.ShowAll();
|
||||||
|
m.Popup();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override void Update (bool full)
|
||||||
|
{
|
||||||
|
if (fullUpdFlag || full)
|
||||||
|
FullUpdate ();
|
||||||
|
// UpdateValues (); inutil dans le contexte
|
||||||
|
timeLabel.LabelProp = string.Format (@"{0:0\.0}", sequenceur.TimeStamp.TotalMilliseconds / 100);
|
||||||
|
|
||||||
|
if (effetChange) {
|
||||||
|
//UpdListeEffets();
|
||||||
|
effetsListe.QueueDraw();
|
||||||
|
SelectionneEffet (sequenceur.IndexLigneEnCours);
|
||||||
|
posLabel.Text = string.Format("n°{0}",sequenceur.IndexLigneEnCours +1 );
|
||||||
|
}
|
||||||
|
updating = true;
|
||||||
|
seqMasterScale.Value = sequenceur.Master;
|
||||||
|
updating = false;
|
||||||
|
|
||||||
|
if (DateTime.Now > nextMaj ) {
|
||||||
|
nextMaj = DateTime.Now.AddMilliseconds(500);
|
||||||
|
StringBuilder str = new StringBuilder ();
|
||||||
|
bool a = false;
|
||||||
|
foreach (Circuit c in sequenceur.Circuits) {
|
||||||
|
if (sequenceur.ValeurBruteCircuit (c) > 0) {
|
||||||
|
if (sequenceur.EstActif (c) != a) {
|
||||||
|
if(!a){
|
||||||
|
str.Append ("<span foreground='#FF8888'>");
|
||||||
|
a = true;
|
||||||
|
} else {
|
||||||
|
str.Append ("</span>");
|
||||||
|
a = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
str.Append (c.ID); str.Append (' ');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (a) {
|
||||||
|
str.Append ("</span>");
|
||||||
|
a = false;
|
||||||
|
}
|
||||||
|
actLabel.LabelProp = str.ToString ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
// récupère la fenètre principale
|
||||||
|
Window win = this.GetAncestor(Gtk.Window.GType) as Window;
|
||||||
|
var dlg = new SelSeqCircuits (sequenceur.Circuits,win);
|
||||||
|
if ((ResponseType)dlg.Run () == ResponseType.Ok) {
|
||||||
|
sequenceur.ChangeCircuits(dlg.GetResultList());
|
||||||
|
}
|
||||||
|
dlg.Destroy();
|
||||||
|
fullUpdFlag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnCloseActionActivated (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void FullUpdate ()
|
||||||
|
{
|
||||||
|
fullUpdFlag = true;
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
if (updating)return;
|
||||||
|
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 );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void OnHbox2SizeAllocated (object o, SizeAllocatedArgs args)
|
||||||
|
{
|
||||||
|
actLabel.SetSizeRequest ( Math.Max(50, args.Allocation.Width - posLabel.Allocation.Width - timeLabel.Allocation.Width - 50),-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
718
DMX-2.0/SequenceurMidi.cs
Normal file
718
DMX-2.0/SequenceurMidi.cs
Normal file
|
|
@ -0,0 +1,718 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
Copyright (C) Arnaud Houdelette 2012-2014
|
||||||
|
Copyright (C) Emmanuel Langlois 2012-2014
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace DMX2
|
||||||
|
{
|
||||||
|
public class SequenceurMidi : Sequenceur
|
||||||
|
{
|
||||||
|
public class Ligne {
|
||||||
|
public Ligne(){}
|
||||||
|
string nom = string.Empty;
|
||||||
|
TimeSpan top = TimeSpan.MinValue;
|
||||||
|
string circuits = string.Empty;
|
||||||
|
int valeur;
|
||||||
|
TimeSpan temps = TimeSpan.Zero;
|
||||||
|
|
||||||
|
public string Nom {
|
||||||
|
get {
|
||||||
|
return nom;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
nom = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimeSpan Top {
|
||||||
|
get {
|
||||||
|
return top;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
top = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Circuits {
|
||||||
|
get {
|
||||||
|
return circuits;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
circuits = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Valeur {
|
||||||
|
get {
|
||||||
|
return valeur;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
valeur = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public TimeSpan Temps {
|
||||||
|
get {
|
||||||
|
return temps;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
temps = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Save (XmlElement parent)
|
||||||
|
{
|
||||||
|
XmlElement el = parent.OwnerDocument.CreateElement ("Ligne");
|
||||||
|
parent.AppendChild (el);
|
||||||
|
|
||||||
|
el.SetAttribute ("nom", nom);
|
||||||
|
el.SetAttribute ("top", top.ToString ());
|
||||||
|
el.SetAttribute ("circuits", circuits);
|
||||||
|
el.SetAttribute ("valeur", valeur.ToString ());
|
||||||
|
el.SetAttribute ("temps", temps.ToString ());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class EffetMacro
|
||||||
|
{
|
||||||
|
public EffetMacro( TimeSpan tempsTransition, int valeurInitiale, int valeurFinale) {
|
||||||
|
TempsPasse = TimeSpan.Zero;
|
||||||
|
TempsTransition = tempsTransition;
|
||||||
|
ValeurInitiale= valeurInitiale;
|
||||||
|
ValeurFinale = valeurFinale;
|
||||||
|
}
|
||||||
|
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>();
|
||||||
|
|
||||||
|
Ligne aSuivre = null;
|
||||||
|
Ligne enCours = null;
|
||||||
|
Ligne ligneMaitre = null;
|
||||||
|
|
||||||
|
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>();
|
||||||
|
|
||||||
|
actionEventTargetEx masterEventTarget=null;
|
||||||
|
actionEventTarget goNextEventTarget=null;
|
||||||
|
actionEventTarget goBackEventTarget=null;
|
||||||
|
|
||||||
|
|
||||||
|
SeqMidiUI ui = null;
|
||||||
|
bool change = false;
|
||||||
|
int master = 100;
|
||||||
|
|
||||||
|
public int Master {
|
||||||
|
get {
|
||||||
|
return master;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
master = value;
|
||||||
|
masterEventTarget.FeedBack ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool paused=false;
|
||||||
|
|
||||||
|
public bool Paused {
|
||||||
|
get {
|
||||||
|
return paused;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
paused = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public SequenceurMidi ()
|
||||||
|
{
|
||||||
|
masterEventTarget = new actionEventTargetEx (
|
||||||
|
delegate(EventData data) {
|
||||||
|
Master = 100 * data.value / 255;
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
delegate{
|
||||||
|
return Master *255/100;
|
||||||
|
},
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
goNextEventTarget = new actionEventTarget (
|
||||||
|
delegate(EventData data) {
|
||||||
|
if(data.value==255) LigneSuivante();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
goBackEventTarget = new actionEventTarget (
|
||||||
|
delegate(EventData data) {
|
||||||
|
if(data.value==255){
|
||||||
|
if (IndexLigneEnCours > 0) {
|
||||||
|
IndexLigneaSuivre = IndexLigneEnCours - 1;
|
||||||
|
LigneSuivante ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public int IndexLigneEnCours
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
if (enCours == null) return -1;
|
||||||
|
return lignes.IndexOf(enCours);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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) {
|
||||||
|
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 {
|
||||||
|
get {
|
||||||
|
return timeStamp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ReadOnlyCollection<Ligne> Lignes {
|
||||||
|
get {
|
||||||
|
return lignes.AsReadOnly();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ReadOnlyCollection<Circuit> Circuits {
|
||||||
|
get {
|
||||||
|
return circuitsSeq.AsReadOnly ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ChangeCircuits (System.Collections.Generic.List<Circuit> list)
|
||||||
|
{
|
||||||
|
foreach (var c in circuitsSeq.ToArray()) {
|
||||||
|
if (!list.Contains (c))
|
||||||
|
lock (this) RetireCircuit (c);
|
||||||
|
}
|
||||||
|
foreach (var c in list)
|
||||||
|
if (!circuitsSeq.Contains (c))
|
||||||
|
lock (this) AjouteCircuit (c);
|
||||||
|
circuitsSeq = list;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AjouteCircuit (Circuit c)
|
||||||
|
{
|
||||||
|
valeurscourantes [c] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RetireCircuit (Circuit c)
|
||||||
|
{
|
||||||
|
circuitsSeq.Remove (c);
|
||||||
|
valeurscourantes.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)
|
||||||
|
{
|
||||||
|
if (!valeurscourantes.ContainsKey (c))
|
||||||
|
return 0;
|
||||||
|
if(master !=100)
|
||||||
|
return valeurscourantes [c] * master /100;
|
||||||
|
return valeurscourantes [c];
|
||||||
|
}
|
||||||
|
|
||||||
|
public int ValeurBruteCircuit (Circuit c)
|
||||||
|
{
|
||||||
|
if (!circuitsSeq.Contains (c))
|
||||||
|
return 0;
|
||||||
|
return valeurscourantes [c];
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool EstActif (Circuit c)
|
||||||
|
{
|
||||||
|
lock (this)
|
||||||
|
return effetsEnCours.ContainsKey(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Tick (TimeSpan time)
|
||||||
|
{
|
||||||
|
if (paused)
|
||||||
|
return;
|
||||||
|
timeStamp += time;
|
||||||
|
|
||||||
|
if (Monitor.TryEnter (this)) {
|
||||||
|
try {
|
||||||
|
if (effetsEnCours.Count > 0) {
|
||||||
|
List<Circuit> circuits = new List<Circuit> (effetsEnCours.Keys);
|
||||||
|
|
||||||
|
foreach (Circuit c in circuits) {
|
||||||
|
if (effetsEnCours [c].Incremente (time)) {
|
||||||
|
valeurscourantes [c] = effetsEnCours [c].ValeurFinale;
|
||||||
|
effetsEnCours.Remove (c);
|
||||||
|
} else {
|
||||||
|
valeurscourantes [c] = effetsEnCours [c].ValeurCourante ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (topPresent) {
|
||||||
|
if (timeStamp > topSuivant) {
|
||||||
|
LigneSuivante ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
Monitor.Exit (this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LigneSuivante ()
|
||||||
|
{
|
||||||
|
lock (this) {
|
||||||
|
if(lignes.Count==0) return;
|
||||||
|
int index;
|
||||||
|
change = true; topPresent = false;
|
||||||
|
if(aSuivre==null) // selection souris
|
||||||
|
{
|
||||||
|
index = IndexLigneEnCours +1; // Premier effet si aucun précédement
|
||||||
|
if(index>= lignes.Count) index = 0; // Boucle si arrivé à la fin
|
||||||
|
|
||||||
|
enCours = lignes[index];
|
||||||
|
|
||||||
|
// Gestion de la Reprise
|
||||||
|
if(enCours.Circuits.ToLower().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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LanceEffetsMacro (bool ecrase, TimeSpan tempsMatrice)
|
||||||
|
{
|
||||||
|
lock (this) {
|
||||||
|
if (ecrase)
|
||||||
|
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))
|
||||||
|
{
|
||||||
|
lock(this)
|
||||||
|
effetsEnCours[c] = new EffetMacro(temps,valeurscourantes[c],valeurCible);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool LigneChange ()
|
||||||
|
{
|
||||||
|
if (change) {
|
||||||
|
change = false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Save (System.Xml.XmlElement parent)
|
||||||
|
{
|
||||||
|
System.Xml.XmlElement el = parent.OwnerDocument.CreateElement ("SequenceurMidi");
|
||||||
|
System.Xml.XmlElement xmlEl;
|
||||||
|
|
||||||
|
parent.AppendChild (el);
|
||||||
|
el.SetAttribute ("id", ID.ToString ());
|
||||||
|
el.SetAttribute ("name", Name);
|
||||||
|
//el.SetAttribute ("master", master.ToString ());
|
||||||
|
|
||||||
|
el.AppendChild(xmlEl = parent.OwnerDocument.CreateElement ("Master"));
|
||||||
|
xmlEl.SetAttribute("value",master.ToString());
|
||||||
|
Conduite.Courante.EventManager.SaveBindings(xmlEl,masterEventTarget);
|
||||||
|
|
||||||
|
xmlEl = parent.OwnerDocument.CreateElement ("EffetSuivant");
|
||||||
|
if(Conduite.Courante.EventManager.SaveBindings(xmlEl,goNextEventTarget )) el.AppendChild(xmlEl);
|
||||||
|
|
||||||
|
xmlEl = parent.OwnerDocument.CreateElement ("EffetPrecedent");
|
||||||
|
if(Conduite.Courante.EventManager.SaveBindings(xmlEl,goBackEventTarget )) el.AppendChild(xmlEl);
|
||||||
|
|
||||||
|
foreach (Circuit c in circuitsSeq) {
|
||||||
|
el.AppendChild(xmlEl = parent.OwnerDocument.CreateElement ("CircuitSeq"));
|
||||||
|
xmlEl.SetAttribute("id",c.ID.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (Ligne li in lignes) {
|
||||||
|
li.Save(el);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public override SequenceurUI GetUI ()
|
||||||
|
{
|
||||||
|
|
||||||
|
if (ui == null) {
|
||||||
|
ui = new SeqMidiUI (this);
|
||||||
|
ui.Destroyed += UiDestroyed;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UiDestroyed (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
ui = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BindMasterEvent (string eventId)
|
||||||
|
{
|
||||||
|
if(eventId.Length==0)
|
||||||
|
{
|
||||||
|
Conduite.Courante.EventManager.Unbind(masterEventTarget);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Conduite.Courante.EventManager.Bind(eventId,masterEventTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BindEffetSuivantEvent (string eventId)
|
||||||
|
{
|
||||||
|
if (eventId.Length == 0) {
|
||||||
|
Conduite.Courante.EventManager.Unbind (goNextEventTarget);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Conduite.Courante.EventManager.Bind(eventId,goNextEventTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void BindEffetPrecedentEvent (string eventId)
|
||||||
|
{
|
||||||
|
if (eventId.Length == 0) {
|
||||||
|
Conduite.Courante.EventManager.Unbind (goBackEventTarget);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Conduite.Courante.EventManager.Bind(eventId,goBackEventTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static new SequenceurMidi Load (Conduite conduite, System.Xml.XmlElement el)
|
||||||
|
{
|
||||||
|
SequenceurMidi seq = new SequenceurMidi();
|
||||||
|
seq.LoadSeq(conduite,el);
|
||||||
|
return seq;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadSeq (Conduite conduite, System.Xml.XmlElement el)
|
||||||
|
{
|
||||||
|
ID = int.Parse (el.GetAttribute ("id"));
|
||||||
|
Name = el.GetAttribute ("name");
|
||||||
|
|
||||||
|
XmlElement xmlE;
|
||||||
|
|
||||||
|
if ((xmlE = el["Master"]) != null) {
|
||||||
|
master = int.Parse (xmlE.TryGetAttribute("value","100"));
|
||||||
|
foreach(string id in EventManager.LoadBindings(xmlE))
|
||||||
|
BindMasterEvent(id);
|
||||||
|
}
|
||||||
|
else master = int.Parse (el.TryGetAttribute("master","100"));
|
||||||
|
|
||||||
|
if ((xmlE = el["EffetSuivant"])!= null)
|
||||||
|
foreach(string id in EventManager.LoadBindings(xmlE))
|
||||||
|
BindEffetSuivantEvent(id);
|
||||||
|
|
||||||
|
if ((xmlE = el["EffetPrecedent"])!= null)
|
||||||
|
foreach(string id in EventManager.LoadBindings(xmlE))
|
||||||
|
BindEffetPrecedentEvent(id);
|
||||||
|
|
||||||
|
foreach (var xc in el.GetElementsByTagName("CircuitSeq")) {
|
||||||
|
System.Xml.XmlElement xcir = xc as System.Xml.XmlElement;
|
||||||
|
Circuit c = conduite.GetCircuitByID (int.Parse (xcir.GetAttribute ("id")));
|
||||||
|
circuitsSeq.Add (c);
|
||||||
|
AjouteCircuit (c);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var xe in el.GetElementsByTagName("Ligne"))
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static System.Text.RegularExpressions.Regex regexCommand1 = new System.Text.RegularExpressions.Regex(
|
||||||
|
@"(?<effet>\d+)(t(?<transition>\d+))?",
|
||||||
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
static System.Text.RegularExpressions.Regex regexCommand2 = new System.Text.RegularExpressions.Regex(
|
||||||
|
@"(?<effet>\d+)(?<params>(t\d+)?)?",
|
||||||
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public override void Command (string command)
|
||||||
|
{
|
||||||
|
lock (this) {
|
||||||
|
var cmd = regexCommand1.Match(command);
|
||||||
|
|
||||||
|
if (cmd.Success) {
|
||||||
|
if (cmd.Groups ["effet"].Success) {
|
||||||
|
int effet = int.Parse (cmd.Groups ["effet"].Value) - 1;
|
||||||
|
int transition=-1;
|
||||||
|
|
||||||
|
if(effet>=lignes.Count) return;
|
||||||
|
enCours = lignes[effet];
|
||||||
|
ligneMaitre = enCours;
|
||||||
|
timeStamp = TimeSpan.Zero;
|
||||||
|
|
||||||
|
topPresent = false;
|
||||||
|
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();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandAdd (int index)
|
||||||
|
{
|
||||||
|
lock (Conduite.Courante.SequenceurMaitre) {
|
||||||
|
string[] commands = Conduite.Courante.SequenceurMaitre.GetCommands (this);
|
||||||
|
|
||||||
|
for (int i = 0; i < commands.Length; i++) {
|
||||||
|
var cmd = regexCommand2.Match(commands[i]);
|
||||||
|
if(cmd.Success){
|
||||||
|
int ef = int.Parse(cmd.Groups["effet"].Value);
|
||||||
|
if (ef-1>index) {
|
||||||
|
ef++;
|
||||||
|
commands[i] = ef.ToString() + cmd.Groups["params"].Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Conduite.Courante.SequenceurMaitre.SetCommands(this,commands);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandRemove (int index)
|
||||||
|
{
|
||||||
|
lock (Conduite.Courante.SequenceurMaitre) {
|
||||||
|
string[] commands = Conduite.Courante.SequenceurMaitre.GetCommands (this);
|
||||||
|
|
||||||
|
for (int i = 0; i < commands.Length; i++) {
|
||||||
|
var cmd = regexCommand2.Match(commands[i]);
|
||||||
|
if(cmd.Success){
|
||||||
|
int ef = int.Parse(cmd.Groups["effet"].Value);
|
||||||
|
if (ef-1 == index)
|
||||||
|
commands[i] = string.Empty;
|
||||||
|
else if (ef-1>index) {
|
||||||
|
ef--;
|
||||||
|
commands[i] = ef.ToString() + cmd.Groups["params"].Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Conduite.Courante.SequenceurMaitre.SetCommands(this,commands);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CommandSwap (int index)
|
||||||
|
{
|
||||||
|
lock (Conduite.Courante.SequenceurMaitre) {
|
||||||
|
string[] commands = Conduite.Courante.SequenceurMaitre.GetCommands (this);
|
||||||
|
|
||||||
|
// numeros a swapper
|
||||||
|
int a = index+1;
|
||||||
|
int b = index+2;
|
||||||
|
|
||||||
|
for (int i = 0; i < commands.Length; i++) {
|
||||||
|
var cmd = regexCommand2.Match(commands[i]);
|
||||||
|
if(cmd.Success){
|
||||||
|
int ef = int.Parse(cmd.Groups["effet"].Value);
|
||||||
|
if (ef == a)
|
||||||
|
commands[i] = b.ToString() + cmd.Groups["params"].Value;
|
||||||
|
if (ef == b)
|
||||||
|
commands[i] = a.ToString() + cmd.Groups["params"].Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Conduite.Courante.SequenceurMaitre.SetCommands(this,commands);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,33 +5,61 @@ namespace DMX2
|
||||||
public partial class SeqMacroUI
|
public partial class SeqMacroUI
|
||||||
{
|
{
|
||||||
private global::Gtk.UIManager UIManager;
|
private global::Gtk.UIManager UIManager;
|
||||||
|
|
||||||
private global::Gtk.ToggleAction closeAction;
|
private global::Gtk.ToggleAction closeAction;
|
||||||
|
|
||||||
private global::Gtk.Action circuitsAction;
|
private global::Gtk.Action circuitsAction;
|
||||||
|
|
||||||
private global::Gtk.Action goForwardAction;
|
private global::Gtk.Action goForwardAction;
|
||||||
|
|
||||||
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 btnAjoutLigne;
|
||||||
|
|
||||||
private global::Gtk.Action btnRetireligne;
|
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;
|
||||||
|
|
||||||
private global::Gtk.VBox vbox2;
|
private global::Gtk.VBox vbox2;
|
||||||
|
|
||||||
private global::Gtk.HBox hbox1;
|
private global::Gtk.HBox hbox1;
|
||||||
|
|
||||||
private global::Gtk.VBox vbox3;
|
private global::Gtk.VBox vbox3;
|
||||||
|
|
||||||
private global::Gtk.EventBox evBBox;
|
private global::Gtk.EventBox evBBox;
|
||||||
|
|
||||||
private global::Gtk.HBox hbox2;
|
private global::Gtk.HBox hbox2;
|
||||||
|
|
||||||
private global::Gtk.Label posLabel;
|
private global::Gtk.Label posLabel;
|
||||||
|
|
||||||
private global::Gtk.Label actLabel;
|
private global::Gtk.Label actLabel;
|
||||||
|
|
||||||
private global::Gtk.Label timeLabel;
|
private global::Gtk.Label timeLabel;
|
||||||
|
|
||||||
private global::Gtk.HScale seqMasterScale;
|
private global::Gtk.HScale seqMasterScale;
|
||||||
|
|
||||||
private global::Gtk.HBox hbox3;
|
private global::Gtk.HBox hbox3;
|
||||||
|
|
||||||
private global::Gtk.Entry txtCommand;
|
private global::Gtk.Entry txtCommand;
|
||||||
|
|
||||||
private global::Gtk.Button btnCommand;
|
private global::Gtk.Button btnCommand;
|
||||||
|
|
||||||
private global::Gtk.Toolbar toolbar;
|
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 effetsListe;
|
private global::Gtk.TreeView effetsListe;
|
||||||
|
|
||||||
private global::Gtk.Label titreLabel;
|
private global::Gtk.Label titreLabel;
|
||||||
|
|
||||||
protected virtual void Build ()
|
protected virtual void Build ()
|
||||||
|
|
@ -135,10 +163,10 @@ namespace DMX2
|
||||||
this.seqMasterScale = new global::Gtk.HScale (null);
|
this.seqMasterScale = new global::Gtk.HScale (null);
|
||||||
this.seqMasterScale.CanFocus = true;
|
this.seqMasterScale.CanFocus = true;
|
||||||
this.seqMasterScale.Name = "seqMasterScale";
|
this.seqMasterScale.Name = "seqMasterScale";
|
||||||
this.seqMasterScale.Adjustment.Upper = 100;
|
this.seqMasterScale.Adjustment.Upper = 100D;
|
||||||
this.seqMasterScale.Adjustment.PageIncrement = 10;
|
this.seqMasterScale.Adjustment.PageIncrement = 10D;
|
||||||
this.seqMasterScale.Adjustment.StepIncrement = 1;
|
this.seqMasterScale.Adjustment.StepIncrement = 1D;
|
||||||
this.seqMasterScale.Adjustment.Value = 100;
|
this.seqMasterScale.Adjustment.Value = 100D;
|
||||||
this.seqMasterScale.DrawValue = true;
|
this.seqMasterScale.DrawValue = true;
|
||||||
this.seqMasterScale.Digits = 0;
|
this.seqMasterScale.Digits = 0;
|
||||||
this.seqMasterScale.ValuePos = ((global::Gtk.PositionType)(1));
|
this.seqMasterScale.ValuePos = ((global::Gtk.PositionType)(1));
|
||||||
|
|
@ -165,49 +193,38 @@ namespace DMX2
|
||||||
this.btnCommand.CanFocus = true;
|
this.btnCommand.CanFocus = true;
|
||||||
this.btnCommand.Name = "btnCommand";
|
this.btnCommand.Name = "btnCommand";
|
||||||
this.btnCommand.UseUnderline = true;
|
this.btnCommand.UseUnderline = true;
|
||||||
// Container child btnCommand.Gtk.Container+ContainerChild
|
this.btnCommand.Label = "Ok";
|
||||||
global::Gtk.Alignment w10 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
|
global::Gtk.Image w10 = new global::Gtk.Image ();
|
||||||
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
w10.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-ok", global::Gtk.IconSize.Menu);
|
||||||
global::Gtk.HBox w11 = new global::Gtk.HBox ();
|
this.btnCommand.Image = w10;
|
||||||
w11.Spacing = 2;
|
|
||||||
// Container child GtkHBox.Gtk.Container+ContainerChild
|
|
||||||
global::Gtk.Image w12 = new global::Gtk.Image ();
|
|
||||||
w12.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-ok", global::Gtk.IconSize.Menu);
|
|
||||||
w11.Add (w12);
|
|
||||||
// Container child GtkHBox.Gtk.Container+ContainerChild
|
|
||||||
global::Gtk.Label w14 = new global::Gtk.Label ();
|
|
||||||
w14.LabelProp = "Ok";
|
|
||||||
w14.UseUnderline = true;
|
|
||||||
w11.Add (w14);
|
|
||||||
w10.Add (w11);
|
|
||||||
this.btnCommand.Add (w10);
|
|
||||||
this.hbox3.Add (this.btnCommand);
|
this.hbox3.Add (this.btnCommand);
|
||||||
global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnCommand]));
|
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnCommand]));
|
||||||
w18.Position = 1;
|
w11.Position = 1;
|
||||||
w18.Expand = false;
|
w11.Expand = false;
|
||||||
w18.Fill = false;
|
w11.Fill = false;
|
||||||
this.vbox3.Add (this.hbox3);
|
this.vbox3.Add (this.hbox3);
|
||||||
global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox3]));
|
global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox3]));
|
||||||
w19.Position = 2;
|
w12.Position = 2;
|
||||||
w19.Expand = false;
|
w12.Expand = false;
|
||||||
w19.Fill = false;
|
w12.Fill = false;
|
||||||
// Container child vbox3.Gtk.Box+BoxChild
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
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.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.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar")));
|
this.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar")));
|
||||||
this.toolbar.Name = "toolbar";
|
this.toolbar.Name = "toolbar";
|
||||||
this.toolbar.ShowArrow = false;
|
this.toolbar.ShowArrow = false;
|
||||||
this.toolbar.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
this.toolbar.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||||
this.toolbar.IconSize = ((global::Gtk.IconSize)(2));
|
this.toolbar.IconSize = ((global::Gtk.IconSize)(2));
|
||||||
this.vbox3.Add (this.toolbar);
|
this.vbox3.Add (this.toolbar);
|
||||||
global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.toolbar]));
|
global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.toolbar]));
|
||||||
w20.Position = 3;
|
w13.Position = 3;
|
||||||
w20.Expand = false;
|
w13.Expand = false;
|
||||||
w20.Fill = false;
|
w13.Fill = false;
|
||||||
this.hbox1.Add (this.vbox3);
|
this.hbox1.Add (this.vbox3);
|
||||||
global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
|
global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
|
||||||
w21.Position = 0;
|
w14.Position = 0;
|
||||||
// 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")));
|
||||||
this.toolbar1.Name = "toolbar1";
|
this.toolbar1.Name = "toolbar1";
|
||||||
this.toolbar1.Orientation = ((global::Gtk.Orientation)(1));
|
this.toolbar1.Orientation = ((global::Gtk.Orientation)(1));
|
||||||
|
|
@ -215,16 +232,16 @@ 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 w22 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar1]));
|
global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar1]));
|
||||||
w22.PackType = ((global::Gtk.PackType)(1));
|
w15.PackType = ((global::Gtk.PackType)(1));
|
||||||
w22.Position = 1;
|
w15.Position = 1;
|
||||||
w22.Expand = false;
|
w15.Expand = false;
|
||||||
w22.Fill = false;
|
w15.Fill = false;
|
||||||
this.vbox2.Add (this.hbox1);
|
this.vbox2.Add (this.hbox1);
|
||||||
global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
|
global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
|
||||||
w23.Position = 0;
|
w16.Position = 0;
|
||||||
w23.Expand = false;
|
w16.Expand = false;
|
||||||
w23.Fill = false;
|
w16.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;
|
||||||
|
|
@ -237,8 +254,8 @@ namespace DMX2
|
||||||
this.effetsListe.RulesHint = true;
|
this.effetsListe.RulesHint = true;
|
||||||
this.scrolledwindow1.Add (this.effetsListe);
|
this.scrolledwindow1.Add (this.effetsListe);
|
||||||
this.vbox2.Add (this.scrolledwindow1);
|
this.vbox2.Add (this.scrolledwindow1);
|
||||||
global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.scrolledwindow1]));
|
global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.scrolledwindow1]));
|
||||||
w25.Position = 1;
|
w18.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);
|
||||||
|
|
|
||||||
286
DMX-2.0/gtk-gui/DMX2.SeqMidiUI.cs
Normal file
286
DMX-2.0/gtk-gui/DMX2.SeqMidiUI.cs
Normal file
|
|
@ -0,0 +1,286 @@
|
||||||
|
|
||||||
|
// This file has been generated by the GUI designer. Do not modify.
|
||||||
|
namespace DMX2
|
||||||
|
{
|
||||||
|
public partial class SeqMidiUI
|
||||||
|
{
|
||||||
|
private global::Gtk.UIManager UIManager;
|
||||||
|
|
||||||
|
private global::Gtk.ToggleAction closeAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action circuitsAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action goForwardAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action goBackAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action mediaPauseAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action mediaNextAction;
|
||||||
|
|
||||||
|
private global::Gtk.Action btnAjoutLigne;
|
||||||
|
|
||||||
|
private global::Gtk.Action btnRetireligne;
|
||||||
|
|
||||||
|
private global::Gtk.Frame frame1;
|
||||||
|
|
||||||
|
private global::Gtk.Alignment GtkAlignment;
|
||||||
|
|
||||||
|
private global::Gtk.Alignment alignment1;
|
||||||
|
|
||||||
|
private global::Gtk.VBox vbox2;
|
||||||
|
|
||||||
|
private global::Gtk.HBox hbox1;
|
||||||
|
|
||||||
|
private global::Gtk.VBox vbox3;
|
||||||
|
|
||||||
|
private global::Gtk.EventBox evBBox;
|
||||||
|
|
||||||
|
private global::Gtk.HBox hbox2;
|
||||||
|
|
||||||
|
private global::Gtk.Label posLabel;
|
||||||
|
|
||||||
|
private global::Gtk.Label actLabel;
|
||||||
|
|
||||||
|
private global::Gtk.Label timeLabel;
|
||||||
|
|
||||||
|
private global::Gtk.HScale seqMasterScale;
|
||||||
|
|
||||||
|
private global::Gtk.HBox hbox3;
|
||||||
|
|
||||||
|
private global::Gtk.Entry txtCommand;
|
||||||
|
|
||||||
|
private global::Gtk.Button btnCommand;
|
||||||
|
|
||||||
|
private global::Gtk.Toolbar toolbar;
|
||||||
|
|
||||||
|
private global::Gtk.Toolbar toolbar1;
|
||||||
|
|
||||||
|
private global::Gtk.ScrolledWindow scrolledwindow1;
|
||||||
|
|
||||||
|
private global::Gtk.TreeView effetsListe;
|
||||||
|
|
||||||
|
private global::Gtk.Label titreLabel;
|
||||||
|
|
||||||
|
protected virtual void Build ()
|
||||||
|
{
|
||||||
|
global::Stetic.Gui.Initialize (this);
|
||||||
|
// Widget DMX2.SeqMidiUI
|
||||||
|
Stetic.BinContainer w1 = global::Stetic.BinContainer.Attach (this);
|
||||||
|
this.UIManager = new global::Gtk.UIManager ();
|
||||||
|
global::Gtk.ActionGroup w2 = new global::Gtk.ActionGroup ("Default");
|
||||||
|
this.closeAction = new global::Gtk.ToggleAction ("closeAction", " ", null, "gtk-close");
|
||||||
|
this.closeAction.ShortLabel = " ";
|
||||||
|
w2.Add (this.closeAction, null);
|
||||||
|
this.circuitsAction = new global::Gtk.Action ("circuitsAction", null, "Association des circuits\nau sequenceur", "circuits");
|
||||||
|
w2.Add (this.circuitsAction, null);
|
||||||
|
this.goForwardAction = new global::Gtk.Action ("goForwardAction", null, null, "gtk-go-forward");
|
||||||
|
w2.Add (this.goForwardAction, null);
|
||||||
|
this.goBackAction = new global::Gtk.Action ("goBackAction", null, null, "gtk-go-back");
|
||||||
|
w2.Add (this.goBackAction, null);
|
||||||
|
this.mediaPauseAction = new global::Gtk.Action ("mediaPauseAction", null, null, "gtk-media-pause");
|
||||||
|
w2.Add (this.mediaPauseAction, null);
|
||||||
|
this.mediaNextAction = new global::Gtk.Action ("mediaNextAction", null, null, "gtk-media-next");
|
||||||
|
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.Name = "DMX2.SeqMidiUI";
|
||||||
|
// Container child DMX2.SeqMidiUI.Gtk.Container+ContainerChild
|
||||||
|
this.frame1 = new global::Gtk.Frame ();
|
||||||
|
this.frame1.Name = "frame1";
|
||||||
|
this.frame1.ShadowType = ((global::Gtk.ShadowType)(1));
|
||||||
|
// Container child frame1.Gtk.Container+ContainerChild
|
||||||
|
this.GtkAlignment = new global::Gtk.Alignment (0F, 0F, 1F, 1F);
|
||||||
|
this.GtkAlignment.Name = "GtkAlignment";
|
||||||
|
this.GtkAlignment.LeftPadding = ((uint)(12));
|
||||||
|
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
||||||
|
this.alignment1 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
|
||||||
|
this.alignment1.Name = "alignment1";
|
||||||
|
// Container child alignment1.Gtk.Container+ContainerChild
|
||||||
|
this.vbox2 = new global::Gtk.VBox ();
|
||||||
|
this.vbox2.Name = "vbox2";
|
||||||
|
this.vbox2.Spacing = 6;
|
||||||
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
|
this.hbox1 = new global::Gtk.HBox ();
|
||||||
|
this.hbox1.Name = "hbox1";
|
||||||
|
this.hbox1.Spacing = 6;
|
||||||
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
|
this.vbox3 = new global::Gtk.VBox ();
|
||||||
|
this.vbox3.Name = "vbox3";
|
||||||
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
|
this.evBBox = new global::Gtk.EventBox ();
|
||||||
|
this.evBBox.Name = "evBBox";
|
||||||
|
// Container child evBBox.Gtk.Container+ContainerChild
|
||||||
|
this.hbox2 = new global::Gtk.HBox ();
|
||||||
|
this.hbox2.WidthRequest = 300;
|
||||||
|
this.hbox2.Name = "hbox2";
|
||||||
|
this.hbox2.Spacing = 6;
|
||||||
|
// Container child hbox2.Gtk.Box+BoxChild
|
||||||
|
this.posLabel = new global::Gtk.Label ();
|
||||||
|
this.posLabel.HeightRequest = 33;
|
||||||
|
this.posLabel.Name = "posLabel";
|
||||||
|
this.posLabel.Xpad = 15;
|
||||||
|
this.posLabel.Xalign = 0F;
|
||||||
|
this.posLabel.LabelProp = "<big>n° 0</big>";
|
||||||
|
this.posLabel.UseMarkup = true;
|
||||||
|
this.hbox2.Add (this.posLabel);
|
||||||
|
global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.posLabel]));
|
||||||
|
w3.Position = 0;
|
||||||
|
w3.Expand = false;
|
||||||
|
w3.Fill = false;
|
||||||
|
// Container child hbox2.Gtk.Box+BoxChild
|
||||||
|
this.actLabel = new global::Gtk.Label ();
|
||||||
|
this.actLabel.Name = "actLabel";
|
||||||
|
this.actLabel.UseMarkup = true;
|
||||||
|
this.actLabel.Wrap = true;
|
||||||
|
this.hbox2.Add (this.actLabel);
|
||||||
|
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.actLabel]));
|
||||||
|
w4.Position = 1;
|
||||||
|
w4.Fill = false;
|
||||||
|
// Container child hbox2.Gtk.Box+BoxChild
|
||||||
|
this.timeLabel = new global::Gtk.Label ();
|
||||||
|
this.timeLabel.HeightRequest = 33;
|
||||||
|
this.timeLabel.Name = "timeLabel";
|
||||||
|
this.timeLabel.Xpad = 15;
|
||||||
|
this.timeLabel.LabelProp = "<big>00.0</big>";
|
||||||
|
this.timeLabel.UseMarkup = true;
|
||||||
|
this.hbox2.Add (this.timeLabel);
|
||||||
|
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.timeLabel]));
|
||||||
|
w5.PackType = ((global::Gtk.PackType)(1));
|
||||||
|
w5.Position = 2;
|
||||||
|
w5.Expand = false;
|
||||||
|
w5.Fill = false;
|
||||||
|
this.evBBox.Add (this.hbox2);
|
||||||
|
this.vbox3.Add (this.evBBox);
|
||||||
|
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.evBBox]));
|
||||||
|
w7.Position = 0;
|
||||||
|
w7.Expand = false;
|
||||||
|
w7.Fill = false;
|
||||||
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
|
this.seqMasterScale = new global::Gtk.HScale (null);
|
||||||
|
this.seqMasterScale.CanFocus = true;
|
||||||
|
this.seqMasterScale.Name = "seqMasterScale";
|
||||||
|
this.seqMasterScale.Adjustment.Upper = 100D;
|
||||||
|
this.seqMasterScale.Adjustment.PageIncrement = 10D;
|
||||||
|
this.seqMasterScale.Adjustment.StepIncrement = 1D;
|
||||||
|
this.seqMasterScale.Adjustment.Value = 100D;
|
||||||
|
this.seqMasterScale.DrawValue = true;
|
||||||
|
this.seqMasterScale.Digits = 0;
|
||||||
|
this.seqMasterScale.ValuePos = ((global::Gtk.PositionType)(1));
|
||||||
|
this.vbox3.Add (this.seqMasterScale);
|
||||||
|
global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.seqMasterScale]));
|
||||||
|
w8.Position = 1;
|
||||||
|
w8.Expand = false;
|
||||||
|
w8.Fill = false;
|
||||||
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
|
this.hbox3 = new global::Gtk.HBox ();
|
||||||
|
this.hbox3.Name = "hbox3";
|
||||||
|
this.hbox3.Spacing = 6;
|
||||||
|
// Container child hbox3.Gtk.Box+BoxChild
|
||||||
|
this.txtCommand = new global::Gtk.Entry ();
|
||||||
|
this.txtCommand.CanFocus = true;
|
||||||
|
this.txtCommand.Name = "txtCommand";
|
||||||
|
this.txtCommand.IsEditable = true;
|
||||||
|
this.txtCommand.InvisibleChar = '●';
|
||||||
|
this.hbox3.Add (this.txtCommand);
|
||||||
|
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.txtCommand]));
|
||||||
|
w9.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;
|
||||||
|
this.btnCommand.Label = "Ok";
|
||||||
|
global::Gtk.Image w10 = new global::Gtk.Image ();
|
||||||
|
w10.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-ok", global::Gtk.IconSize.Menu);
|
||||||
|
this.btnCommand.Image = w10;
|
||||||
|
this.hbox3.Add (this.btnCommand);
|
||||||
|
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnCommand]));
|
||||||
|
w11.Position = 1;
|
||||||
|
w11.Expand = false;
|
||||||
|
w11.Fill = false;
|
||||||
|
this.vbox3.Add (this.hbox3);
|
||||||
|
global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox3]));
|
||||||
|
w12.Position = 2;
|
||||||
|
w12.Expand = false;
|
||||||
|
w12.Fill = false;
|
||||||
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
|
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.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar")));
|
||||||
|
this.toolbar.Name = "toolbar";
|
||||||
|
this.toolbar.ShowArrow = false;
|
||||||
|
this.toolbar.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||||
|
this.toolbar.IconSize = ((global::Gtk.IconSize)(2));
|
||||||
|
this.vbox3.Add (this.toolbar);
|
||||||
|
global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.toolbar]));
|
||||||
|
w13.Position = 3;
|
||||||
|
w13.Expand = false;
|
||||||
|
w13.Fill = false;
|
||||||
|
this.hbox1.Add (this.vbox3);
|
||||||
|
global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
|
||||||
|
w14.Position = 0;
|
||||||
|
// 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.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar1")));
|
||||||
|
this.toolbar1.Name = "toolbar1";
|
||||||
|
this.toolbar1.Orientation = ((global::Gtk.Orientation)(1));
|
||||||
|
this.toolbar1.ShowArrow = false;
|
||||||
|
this.toolbar1.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||||
|
this.toolbar1.IconSize = ((global::Gtk.IconSize)(2));
|
||||||
|
this.hbox1.Add (this.toolbar1);
|
||||||
|
global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar1]));
|
||||||
|
w15.PackType = ((global::Gtk.PackType)(1));
|
||||||
|
w15.Position = 1;
|
||||||
|
w15.Expand = false;
|
||||||
|
w15.Fill = false;
|
||||||
|
this.vbox2.Add (this.hbox1);
|
||||||
|
global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
|
||||||
|
w16.Position = 0;
|
||||||
|
w16.Expand = false;
|
||||||
|
w16.Fill = false;
|
||||||
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
|
this.scrolledwindow1 = new global::Gtk.ScrolledWindow ();
|
||||||
|
this.scrolledwindow1.CanFocus = true;
|
||||||
|
this.scrolledwindow1.Name = "scrolledwindow1";
|
||||||
|
this.scrolledwindow1.ShadowType = ((global::Gtk.ShadowType)(1));
|
||||||
|
// Container child scrolledwindow1.Gtk.Container+ContainerChild
|
||||||
|
this.effetsListe = new global::Gtk.TreeView ();
|
||||||
|
this.effetsListe.CanFocus = true;
|
||||||
|
this.effetsListe.Name = "effetsListe";
|
||||||
|
this.effetsListe.RulesHint = true;
|
||||||
|
this.scrolledwindow1.Add (this.effetsListe);
|
||||||
|
this.vbox2.Add (this.scrolledwindow1);
|
||||||
|
global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.scrolledwindow1]));
|
||||||
|
w18.Position = 1;
|
||||||
|
this.alignment1.Add (this.vbox2);
|
||||||
|
this.GtkAlignment.Add (this.alignment1);
|
||||||
|
this.frame1.Add (this.GtkAlignment);
|
||||||
|
this.titreLabel = new global::Gtk.Label ();
|
||||||
|
this.titreLabel.Name = "titreLabel";
|
||||||
|
this.titreLabel.LabelProp = "Séquenceur Macro";
|
||||||
|
this.titreLabel.UseMarkup = true;
|
||||||
|
this.frame1.LabelWidget = this.titreLabel;
|
||||||
|
this.Add (this.frame1);
|
||||||
|
if ((this.Child != null)) {
|
||||||
|
this.Child.ShowAll ();
|
||||||
|
}
|
||||||
|
w1.SetUiManager (UIManager);
|
||||||
|
this.Hide ();
|
||||||
|
this.closeAction.Activated += new global::System.EventHandler (this.OnCloseActionActivated);
|
||||||
|
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.hbox2.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnHbox2SizeAllocated);
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2011,6 +2011,304 @@ au sequenceur</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="Gtk.Bin" id="DMX2.SeqMidiUI" design-size="924 467">
|
||||||
|
<action-group name="Default">
|
||||||
|
<action id="closeAction">
|
||||||
|
<property name="Type">Toggle</property>
|
||||||
|
<property name="Label" translatable="yes"> </property>
|
||||||
|
<property name="ShortLabel" translatable="yes"> </property>
|
||||||
|
<property name="StockId">gtk-close</property>
|
||||||
|
<property name="DrawAsRadio">False</property>
|
||||||
|
<property name="Active">False</property>
|
||||||
|
<signal name="Activated" handler="OnCloseActionActivated" />
|
||||||
|
</action>
|
||||||
|
<action id="circuitsAction">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="StockId">circuits</property>
|
||||||
|
<property name="Tooltip" translatable="yes">Association des circuits
|
||||||
|
au sequenceur</property>
|
||||||
|
<signal name="Activated" handler="OnCircuitsActionActivated" />
|
||||||
|
</action>
|
||||||
|
<action id="goForwardAction">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="StockId">gtk-go-forward</property>
|
||||||
|
<signal name="Activated" handler="OnGoForwardActionActivated" />
|
||||||
|
</action>
|
||||||
|
<action id="goBackAction">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="StockId">gtk-go-back</property>
|
||||||
|
<signal name="Activated" handler="OnGoBackActionActivated" />
|
||||||
|
</action>
|
||||||
|
<action id="mediaPauseAction">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="StockId">gtk-media-pause</property>
|
||||||
|
<signal name="Activated" handler="OnMediaPauseActionActivated" />
|
||||||
|
</action>
|
||||||
|
<action id="mediaNextAction">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="StockId">gtk-media-next</property>
|
||||||
|
</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>
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Visible">False</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Frame" id="frame1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="ShadowType">In</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Alignment" id="GtkAlignment">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Xalign">0</property>
|
||||||
|
<property name="Yalign">0</property>
|
||||||
|
<property name="LeftPadding">12</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Alignment" id="alignment1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.VBox" id="vbox2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.HBox" id="hbox1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.VBox" id="vbox3">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.EventBox" id="evBBox">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.HBox" id="hbox2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="WidthRequest">300</property>
|
||||||
|
<property name="Spacing">6</property>
|
||||||
|
<signal name="SizeAllocated" handler="OnHbox2SizeAllocated" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="posLabel">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="HeightRequest">33</property>
|
||||||
|
<property name="Xpad">15</property>
|
||||||
|
<property name="Xalign">0</property>
|
||||||
|
<property name="LabelProp" translatable="yes"><big>n° 0</big></property>
|
||||||
|
<property name="UseMarkup">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="actLabel">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="UseMarkup">True</property>
|
||||||
|
<property name="Wrap">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="timeLabel">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="HeightRequest">33</property>
|
||||||
|
<property name="Xpad">15</property>
|
||||||
|
<property name="LabelProp" translatable="yes"><big>00.0</big></property>
|
||||||
|
<property name="UseMarkup">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="PackType">End</property>
|
||||||
|
<property name="Position">2</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.HScale" id="seqMasterScale">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="Upper">100</property>
|
||||||
|
<property name="PageIncrement">10</property>
|
||||||
|
<property name="StepIncrement">1</property>
|
||||||
|
<property name="Value">100</property>
|
||||||
|
<property name="DrawValue">True</property>
|
||||||
|
<property name="Digits">0</property>
|
||||||
|
<property name="ValuePos">Right</property>
|
||||||
|
<signal name="ValueChanged" handler="OnSeqMasterScaleValueChanged" />
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.HBox" id="hbox3">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<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>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">2</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Toolbar" id="toolbar">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="ShowArrow">False</property>
|
||||||
|
<property name="ButtonStyle">Icons</property>
|
||||||
|
<property name="IconSize">SmallToolbar</property>
|
||||||
|
<node name="toolbar" type="Toolbar">
|
||||||
|
<node type="Toolitem" action="goForwardAction" />
|
||||||
|
<node type="Toolitem" action="goBackAction" />
|
||||||
|
<node type="Toolitem" action="mediaPauseAction" />
|
||||||
|
<node type="Toolitem" action="btnAjoutLigne" />
|
||||||
|
<node type="Toolitem" action="btnRetireligne" />
|
||||||
|
</node>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">3</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Toolbar" id="toolbar1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Orientation">Vertical</property>
|
||||||
|
<property name="ShowArrow">False</property>
|
||||||
|
<property name="ButtonStyle">Icons</property>
|
||||||
|
<property name="IconSize">SmallToolbar</property>
|
||||||
|
<node name="toolbar1" type="Toolbar">
|
||||||
|
<node type="Toolitem" action="closeAction" />
|
||||||
|
<node type="Toolitem" action="circuitsAction" />
|
||||||
|
</node>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="PackType">End</property>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="ShadowType">In</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.TreeView" id="effetsListe">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="RulesHint">True</property>
|
||||||
|
<signal name="CursorChanged" handler="OnEffetsListeCursorChanged" />
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="titreLabel">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">Séquenceur Macro</property>
|
||||||
|
<property name="UseMarkup">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="type">label_item</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
<widget class="Gtk.Dialog" id="DMX2.GestionDriversUI" design-size="488 420">
|
<widget class="Gtk.Dialog" id="DMX2.GestionDriversUI" design-size="488 420">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="WindowPosition">CenterOnParent</property>
|
<property name="WindowPosition">CenterOnParent</property>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue