Sauvegarde des Params Midi
...
This commit is contained in:
tzim 2014-05-22 18:09:51 +00:00
parent b8deef5611
commit 7958281c47
14 changed files with 324 additions and 181 deletions

View file

@ -133,6 +133,13 @@ namespace DMX2
} }
public static void Close ()
{
if(seq_handle==null) return;
seq_handle.Dispose();
seq_handle = null;
}
public static bool GetEvent(out snd_seq_event_t ev){ public static bool GetEvent(out snd_seq_event_t ev){
if(seq_handle==null) throw new InvalidOperationException(); if(seq_handle==null) throw new InvalidOperationException();
@ -181,6 +188,7 @@ namespace DMX2
public static IEnumerable<Client> EnumClients () public static IEnumerable<Client> EnumClients ()
{ {
if(seq_handle==null) throw new InvalidOperationException();
using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) { using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) {
Invoke.snd_seq_client_info_set_client(clientInfo.Pointer, -1); Invoke.snd_seq_client_info_set_client(clientInfo.Pointer, -1);
while (Invoke.snd_seq_query_next_client(seq_handle.Handle,clientInfo.Pointer)>=0) { while (Invoke.snd_seq_query_next_client(seq_handle.Handle,clientInfo.Pointer)>=0) {
@ -191,6 +199,7 @@ namespace DMX2
public static Client GetClientByID (int client) public static Client GetClientByID (int client)
{ {
if(seq_handle==null) throw new InvalidOperationException();
using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) { using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) {
if (Invoke.snd_seq_get_any_client_info (seq_handle.Handle, client, clientInfo.Pointer) >= 0) { if (Invoke.snd_seq_get_any_client_info (seq_handle.Handle, client, clientInfo.Pointer) >= 0) {
return new Client (clientInfo); return new Client (clientInfo);
@ -200,6 +209,7 @@ namespace DMX2
} }
public static Port GetPortByIDs(int client,int port){ public static Port GetPortByIDs(int client,int port){
if(seq_handle==null) throw new InvalidOperationException();
using (PointerWrapper portInfo = new PointerWrapper(GetPortInfoSize ())) { using (PointerWrapper portInfo = new PointerWrapper(GetPortInfoSize ())) {
if(Invoke.snd_seq_get_any_port_info(seq_handle.Handle,client,port,portInfo.Pointer) >= 0) { if(Invoke.snd_seq_get_any_port_info(seq_handle.Handle,client,port,portInfo.Pointer) >= 0) {
return new Port(portInfo); return new Port(portInfo);
@ -211,6 +221,7 @@ namespace DMX2
public static bool Connect(Port port) public static bool Connect(Port port)
{ {
if(seq_handle==null) throw new InvalidOperationException();
bool isInput = (port.Caps & SND_SEQ_PORT_CAP_WRITE) == SND_SEQ_PORT_CAP_WRITE; bool isInput = (port.Caps & SND_SEQ_PORT_CAP_WRITE) == SND_SEQ_PORT_CAP_WRITE;
bool isOutput = (port.Caps & SND_SEQ_PORT_CAP_READ) == SND_SEQ_PORT_CAP_READ; bool isOutput = (port.Caps & SND_SEQ_PORT_CAP_READ) == SND_SEQ_PORT_CAP_READ;
@ -226,14 +237,17 @@ namespace DMX2
} }
public static bool ConnectTo(int client, int port){ public static bool ConnectTo(int client, int port){
if(seq_handle==null) throw new InvalidOperationException();
return Invoke.snd_seq_connect_to(seq_handle.Handle,outport,client,port)==0; return Invoke.snd_seq_connect_to(seq_handle.Handle,outport,client,port)==0;
} }
public static bool ConnectFrom(int client, int port){ public static bool ConnectFrom(int client, int port){
if(seq_handle==null) throw new InvalidOperationException();
return Invoke.snd_seq_connect_from(seq_handle.Handle,inport,client,port)==0; return Invoke.snd_seq_connect_from(seq_handle.Handle,inport,client,port)==0;
} }
public static void Deconnecte (int client, int port) public static void Deconnecte (int client, int port)
{ {
if(seq_handle==null) throw new InvalidOperationException();
snd_seq_addr_t local = new snd_seq_addr_t (); snd_seq_addr_t local = new snd_seq_addr_t ();
local.client = (byte)clientId; local.client = (byte)clientId;
local.port = (byte)inport; local.port = (byte)inport;

View file

@ -364,6 +364,7 @@ namespace DMX2
foreach(var driver in Drivers) foreach(var driver in Drivers)
driver.Dispose(); driver.Dispose();
tickThread=null; tickThread=null;
Midi.Dispose();
disposed=true; disposed=true;
} }
@ -413,6 +414,8 @@ namespace DMX2
EventManager.SaveBindings(xmlMaster,masterEventTarget); EventManager.SaveBindings(xmlMaster,masterEventTarget);
xmlRoot.AppendChild(xmlMaster); xmlRoot.AppendChild(xmlMaster);
Midi.Save(xmlRoot);
seqmaitre.Save(xmlRoot); seqmaitre.Save(xmlRoot);
return xmlDoc; return xmlDoc;
@ -465,6 +468,8 @@ namespace DMX2
} }
Midi.Load(root["Midi"]);
seqmaitre = SequenceurMaitre.Load(this,root["SequenceurMaitre"]); seqmaitre = SequenceurMaitre.Load(this,root["SequenceurMaitre"]);
StartThread(); StartThread();

View file

@ -80,7 +80,9 @@ namespace DMX2
void Connection () void Connection ()
{ {
#if DEBUG
Console.WriteLine ("DriverV1.Connection()"); Console.WriteLine ("DriverV1.Connection()");
#endif
if (serial != null) { if (serial != null) {
serial.Close(); serial.Close();
serial.Dispose(); serial.Dispose();

View file

@ -127,7 +127,9 @@ namespace DMX2
void Connection () void Connection ()
{ {
#if DEBUG
Console.WriteLine ("DriverV2.Connection()"); Console.WriteLine ("DriverV2.Connection()");
#endif
if (serial != null) { if (serial != null) {
serial.Close (); serial.Close ();
serial.Dispose (); serial.Dispose ();
@ -138,10 +140,6 @@ namespace DMX2
return; return;
} }
serial = new SerialPort (portname, 460800, Parity.None, 8, StopBits.One); serial = new SerialPort (portname, 460800, Parity.None, 8, StopBits.One);
Console.WriteLine (portname);
//serial.DtrEnable = false;
//serial.ReadTimeout = 200;
//serial.WriteTimeout = 200;
try { try {
serial.Open (); serial.Open ();
Attente(DateTime.Now.AddMilliseconds(2000)); Attente(DateTime.Now.AddMilliseconds(2000));
@ -155,7 +153,9 @@ namespace DMX2
} catch (Exception ex) { } catch (Exception ex) {
etat = etatAutomate.Deconnecte; etat = etatAutomate.Deconnecte;
#if DEBUG
Console.WriteLine("DriverV2:Connection : {0}",ex); Console.WriteLine("DriverV2:Connection : {0}",ex);
#endif
Thread.Sleep (500); Thread.Sleep (500);
} }
} }
@ -167,7 +167,9 @@ namespace DMX2
bool Synchronisation () bool Synchronisation ()
{ {
//return true; //return true;
#if DEBUG
Console.WriteLine ("DriverV2.Synchronisation()"); Console.WriteLine ("DriverV2.Synchronisation()");
#endif
if (serial == null) if (serial == null)
return false; return false;
@ -230,7 +232,9 @@ namespace DMX2
EnvoieReInit(); EnvoieReInit();
break; break;
case etatAutomate.Erreur: case etatAutomate.Erreur:
#if DEBUG
Console.WriteLine("DriverV2 : etatAutomate.Erreur"); Console.WriteLine("DriverV2 : etatAutomate.Erreur");
#endif
compteErreur ++; compteErreur ++;
Deconnecte (); Deconnecte ();
Attente (DateTime.Now.AddSeconds (2)); Attente (DateTime.Now.AddSeconds (2));
@ -261,7 +265,9 @@ namespace DMX2
void Deconnecte () void Deconnecte ()
{ {
#if DEBUG
Console.WriteLine("DriverV2.Deconnection"); Console.WriteLine("DriverV2.Deconnection");
#endif
etat = etatAutomate.Deconnecte; etat = etatAutomate.Deconnecte;
if(serial == null) return; if(serial == null) return;

View file

@ -202,7 +202,9 @@ namespace DMX2
bool Synchronisation () bool Synchronisation ()
{ {
//return true; //return true;
#if DEBUG
Console.WriteLine ("DriverV3.Synchronisation()"); Console.WriteLine ("DriverV3.Synchronisation()");
#endif
if (serial == null) if (serial == null)
return false; return false;
@ -316,7 +318,9 @@ namespace DMX2
void Deconnecte () void Deconnecte ()
{ {
#if DEBUG
Console.WriteLine("DriverV3.Deconnection"); Console.WriteLine("DriverV3.Deconnection");
#endif
etat = etatAutomate.Deconnecte; etat = etatAutomate.Deconnecte;
if(serial == null) return; if(serial == null) return;
@ -401,7 +405,9 @@ namespace DMX2
void Parametrage () void Parametrage ()
{ {
#if DEBUG
Console.WriteLine ("DriverV3.Parametrage()"); Console.WriteLine ("DriverV3.Parametrage()");
#endif
paramFlag = false; paramFlag = false;
if (!serial.IsOpen) { if (!serial.IsOpen) {

View file

@ -281,7 +281,9 @@ namespace DMX2
///<summary> Fonction appelee sur evenement</summary> ///<summary> Fonction appelee sur evenement</summary>
public void EventCallBack (EventData data) public void EventCallBack (EventData data)
{ {
#if DEBUG
Console.WriteLine("Event {0} => {1} (last = {2})",data.id,data.value,data.prev_value); Console.WriteLine("Event {0} => {1} (last = {2})",data.id,data.value,data.prev_value);
#endif
if (bindings.ContainsKey (data.id)) { if (bindings.ContainsKey (data.id)) {
foreach (IEventTarget target in bindings[data.id].Targets) { foreach (IEventTarget target in bindings[data.id].Targets) {
target.FireEvent(data); target.FireEvent(data);

View file

@ -46,8 +46,11 @@ namespace DMX2
Destroyed+= HandleDestroyed; Destroyed+= HandleDestroyed;
spinNbPage.Value = MidiEventProvider.Maxpage; spinNbPage.Value = Conduite.Courante.Midi.Maxpage;
chkNoChanZero.Active = MidiEventProvider.UnpaginatedChannels.Contains(0); if(Conduite.Courante.Midi.UnpaginatedChannels.Count==0)
spinUPCh.Value = 0;
else
spinUPCh.Value= Conduite.Courante.Midi.UnpaginatedChannels[0]+1;
} }
@ -59,7 +62,7 @@ namespace DMX2
bool Refresh () bool Refresh ()
{ {
if (MidiEventProvider.GuiRefreshFlag) { if (Conduite.Courante.Midi.GuiRefreshFlag) {
FillLsDetect(); FillLsDetect();
FillLsKnown(); FillLsKnown();
} }
@ -82,7 +85,7 @@ namespace DMX2
foreach(var port in dev.Ports){ foreach(var port in dev.Ports){
if((port.Caps & AlsaSeqLib.SND_SEQ_PORT_CAP_READ) == AlsaSeqLib.SND_SEQ_PORT_CAP_READ){ if((port.Caps & AlsaSeqLib.SND_SEQ_PORT_CAP_READ) == AlsaSeqLib.SND_SEQ_PORT_CAP_READ){
string name = dev.Name+":"+port.Name; string name = dev.Name+":"+port.Name;
if(!MidiEventProvider.IsKnownDevice(name)) if(!Conduite.Courante.Midi.IsKnownDevice(name))
lsDetect.AppendValues(name); lsDetect.AppendValues(name);
} }
} }
@ -92,7 +95,7 @@ namespace DMX2
void FillLsKnown () void FillLsKnown ()
{ {
lsKnown.Clear (); lsKnown.Clear ();
foreach (var dev in MidiEventProvider.KnownDevices) { foreach (var dev in Conduite.Courante.Midi.KnownDevices) {
lsKnown.AppendValues(dev); lsKnown.AppendValues(dev);
} }
} }
@ -121,7 +124,7 @@ namespace DMX2
TreeIter iter; TreeIter iter;
if(!listDetect.Selection.GetSelected(out iter)) return; if(!listDetect.Selection.GetSelected(out iter)) return;
string name= lsDetect.GetValue(iter,0) as string; string name= lsDetect.GetValue(iter,0) as string;
MidiEventProvider.ConnectDevice(name); Conduite.Courante.Midi.ConnectDevice(name);
FillLsDetect () ; FillLsDetect () ;
FillLsKnown(); FillLsKnown();
@ -132,7 +135,7 @@ namespace DMX2
TreeIter iter; TreeIter iter;
if(!listKnown.Selection.GetSelected(out iter)) return; if(!listKnown.Selection.GetSelected(out iter)) return;
MidiEventProvider.MidiDev dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDev ; MidiEventProvider.MidiDev dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDev ;
MidiEventProvider.DisconnectDevice(dev); Conduite.Courante.Midi.DisconnectDevice(dev);
FillLsDetect () ; FillLsDetect () ;
FillLsKnown(); FillLsKnown();
@ -146,21 +149,25 @@ namespace DMX2
MidiEventProvider.MidiDev dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDev ; MidiEventProvider.MidiDev dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDev ;
dev.HasFeedback = chkFB.Active; dev.HasFeedback = chkFB.Active;
MidiEventProvider.RefreshFeedback(dev.Name); Conduite.Courante.Midi.RefreshFeedback(dev.Name);
} }
protected void OnChkNoChanZeroToggled (object sender, EventArgs e)
{
MidiEventProvider.UnpaginatedChannels.Clear();
if(chkNoChanZero.Active)
MidiEventProvider.UnpaginatedChannels.Add(0);
}
protected void OnSpinNbPageValueChanged (object sender, EventArgs e) protected void OnSpinNbPageValueChanged (object sender, EventArgs e)
{ {
MidiEventProvider.Maxpage = (uint) spinNbPage.ValueAsInt; Conduite.Courante.Midi.Maxpage = (uint) spinNbPage.ValueAsInt;
} }
protected void OnSpinUPChValueChanged (object sender, EventArgs e)
{
Conduite.Courante.Midi.UnpaginatedChannels.Clear();
if (spinUPCh.ValueAsInt == 0) return;
Conduite.Courante.Midi.UnpaginatedChannels.Add((byte)(spinUPCh.ValueAsInt-1));
}
} }
} }

View file

@ -70,10 +70,6 @@ namespace DMX2
using (System.IO.TextReader reader = new System.IO.StreamReader(stream)) using (System.IO.TextReader reader = new System.IO.StreamReader(stream))
Gtk.Rc.ParseString (reader.ReadToEnd ()); Gtk.Rc.ParseString (reader.ReadToEnd ());
AlsaSeqLib.Init();
// Creation de la fenetre principale // Creation de la fenetre principale
MainWindow win = new MainWindow (); MainWindow win = new MainWindow ();
// application des options // application des options

View file

@ -571,7 +571,7 @@ namespace DMX2
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 = btnPause.Sensitive = btnBlackOut.Sensitive =
connectAction.Sensitive = connectAction.Sensitive = midiAction.Sensitive =
saveAsAction.Sensitive = closeAction.Sensitive = true; saveAsAction.Sensitive = closeAction.Sensitive = true;
openAction.Sensitive = newAction.Sensitive = false; openAction.Sensitive = newAction.Sensitive = false;
@ -583,7 +583,7 @@ namespace DMX2
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 = btnPause.Sensitive = btnBlackOut.Sensitive =
connectAction.Sensitive = connectAction.Sensitive = midiAction.Sensitive =
saveAsAction.Sensitive = closeAction.Sensitive = false; saveAsAction.Sensitive = closeAction.Sensitive = false;
openAction.Sensitive = newAction.Sensitive = true; openAction.Sensitive = newAction.Sensitive = true;
@ -770,6 +770,7 @@ namespace DMX2
protected void OnMidiActionActivated (object sender, EventArgs e) protected void OnMidiActionActivated (object sender, EventArgs e)
{ {
if(Conduite.Courante == null) return;
if (mDlg != null) { if (mDlg != null) {
mDlg.Show(); mDlg.Show();
return; return;

View file

@ -23,7 +23,7 @@ using System.Linq;
namespace DMX2 namespace DMX2
{ {
public class MidiEventProvider : IEventProvider public class MidiEventProvider : IEventProvider, IDisposable
{ {
class internalEvent { class internalEvent {
@ -114,7 +114,7 @@ namespace DMX2
if (prov.CurrentPage == iev.Page || iev.Page == 0) { if (prov.CurrentPage == iev.Page || iev.Page == 0) {
prov.SendEvent (ev); prov.SendEvent (ev);
foreach (int srcid in MidiEventProvider.feedbacksources) { foreach (int srcid in prov.feedbacksources) {
prov.lastValueOfSrc[CombineHash( srcid , iev.MidiEvCode)] = data; prov.lastValueOfSrc[CombineHash( srcid , iev.MidiEvCode)] = data;
} }
} }
@ -184,15 +184,15 @@ namespace DMX2
/// <summary> /// <summary>
/// Liste des peripheriques connus (presents ou non) /// Liste des peripheriques connus (presents ou non)
/// </summary> /// </summary>
static readonly Dictionary<string,MidiDev> knowndevices = new Dictionary<string,MidiDev>(); readonly Dictionary<string,MidiDev> knowndevices = new Dictionary<string,MidiDev>();
/// <summary> /// <summary>
/// Liste des ports connectés avec feedback /// Liste des ports connectés avec feedback
/// </summary> /// </summary>
static readonly List<int> feedbacksources = new List<int>(); readonly List<int> feedbacksources = new List<int>();
//static readonly Dictionary<int,MidiDev> srcidToDev = new Dictionary<int, MidiDev>(); //static readonly Dictionary<int,MidiDev> srcidToDev = new Dictionary<int, MidiDev>();
static readonly List<byte> unpaginatedchannels = new List<byte>(); readonly List<byte> unpaginatedchannels = new List<byte>();
/// <summary> /// <summary>
/// Derniere valeur connue pour une evenement sur source donnée : /// Derniere valeur connue pour une evenement sur source donnée :
@ -205,10 +205,10 @@ namespace DMX2
internalEvent levent=null; internalEvent levent=null;
bool connected=false; bool connected=false;
static bool guirefreshflag=false; bool guirefreshflag=false;
uint page=1; uint page=1;
static uint maxpage=8; uint maxpage=8;
public uint CurrentPage { public uint CurrentPage {
get { get {
@ -221,7 +221,7 @@ namespace DMX2
} }
} }
public static uint Maxpage { public uint Maxpage {
get { get {
return maxpage; return maxpage;
} }
@ -229,13 +229,13 @@ namespace DMX2
maxpage = value; maxpage = value;
} }
} }
public static List<byte> UnpaginatedChannels { public List<byte> UnpaginatedChannels {
get { get {
return unpaginatedchannels; return unpaginatedchannels;
} }
} }
public static bool GuiRefreshFlag { public bool GuiRefreshFlag {
get { get {
if(guirefreshflag){ if(guirefreshflag){
guirefreshflag=false; guirefreshflag=false;
@ -246,13 +246,13 @@ namespace DMX2
} }
static public void ConnectDevice (string name) public void ConnectDevice (string name)
{ {
knowndevices.Add(name,new MidiDev(name)); knowndevices.Add(name,new MidiDev(name));
AutoConnect(); AutoConnect();
} }
static public void RefreshFeedback (string name) public void RefreshFeedback (string name)
{ {
foreach (int port in knowndevices[name].ConnectedPorts) { foreach (int port in knowndevices[name].ConnectedPorts) {
if(knowndevices[name].HasFeedback){ if(knowndevices[name].HasFeedback){
@ -265,7 +265,7 @@ namespace DMX2
} }
} }
public static void DisconnectDevice (MidiEventProvider.MidiDev dev) public void DisconnectDevice (MidiEventProvider.MidiDev dev)
{ {
if (!knowndevices.ContainsKey (dev.Name)) if (!knowndevices.ContainsKey (dev.Name))
return; return;
@ -279,32 +279,26 @@ namespace DMX2
} }
} }
static public bool IsKnownDevice(string name){ public bool IsKnownDevice(string name){
return knowndevices.ContainsKey(name); return knowndevices.ContainsKey(name);
} }
static public IEnumerable<MidiDev> KnownDevices { public IEnumerable<MidiDev> KnownDevices {
get { get {
return knowndevices.Values; return knowndevices.Values;
} }
} }
static MidiEventProvider ()
public MidiEventProvider (EventManager manager)
{ {
MidiDev dev = new MidiDev("VMPK Input:VMPK Input"); /*MidiDev dev = new MidiDev("VMPK Input:VMPK Input");
dev.HasFeedback = true; dev.HasFeedback = true;
knowndevices.Add(dev.Name,dev); knowndevices.Add(dev.Name,dev);
dev = new MidiDev("VMPK Output:VMPK Output"); dev = new MidiDev("VMPK Output:VMPK Output");
dev.HasFeedback = true; dev.HasFeedback = true;
knowndevices.Add(dev.Name,dev);
/*
dev = new MidiDev("BCF2000:BCF2000 MIDI 1");
dev.HasFeedback = true;
knowndevices.Add(dev.Name,dev);*/ knowndevices.Add(dev.Name,dev);*/
}
public MidiEventProvider (EventManager manager)
{
manager.RegisterProvider (this); manager.RegisterProvider (this);
AlsaSeqLib.Init (); AlsaSeqLib.Init ();
@ -315,7 +309,7 @@ namespace DMX2
unpaginatedchannels.Add((byte)0); unpaginatedchannels.Add((byte)0);
} }
static void AutoConnect () void AutoConnect ()
{ {
foreach (var cli in AlsaSeqLib.EnumClients()) { foreach (var cli in AlsaSeqLib.EnumClients()) {
foreach(var p in cli.Ports){ foreach(var p in cli.Ports){
@ -324,7 +318,7 @@ namespace DMX2
} }
} }
static void PortDetected (AlsaSeqLib.Client cli, AlsaSeqLib.Port p) void PortDetected (AlsaSeqLib.Client cli, AlsaSeqLib.Port p)
{ {
// Execute a chaque 'apparition' d'un port midi // Execute a chaque 'apparition' d'un port midi
@ -342,7 +336,7 @@ namespace DMX2
} }
} }
static void PortConnect (AlsaSeqLib.snd_seq_connect_t cn, bool connect) void PortConnect (AlsaSeqLib.snd_seq_connect_t cn, bool connect)
{ {
int clientId,portId; int clientId,portId;
if (cn.dest.client == AlsaSeqLib.ClientId) { if (cn.dest.client == AlsaSeqLib.ClientId) {
@ -535,6 +529,9 @@ namespace DMX2
case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CLOCK: case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CLOCK:
case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_SENSING: case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_SENSING:
continue; continue;
case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PGMCHANGE:
CurrentPage = (uint)evS.data_ev_ctrl.value;
continue;
case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_START: case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_START:
PortDetected( PortDetected(
AlsaSeqLib.GetClientByID(evS.data_addr.client), AlsaSeqLib.GetClientByID(evS.data_addr.client),
@ -669,5 +666,62 @@ namespace DMX2
#endregion #endregion
#region IDisposable implementation
bool disposed=false;
~MidiEventProvider(){
Dispose();
}
public void Dispose ()
{
if(disposed)return;
disposed=true;
AlsaSeqLib.Close();
}
#endregion
public void Save (System.Xml.XmlElement parent)
{
System.Xml.XmlElement el = parent.OwnerDocument.CreateElement ("Midi");
parent.AppendChild (el);
el.SetAttribute ("maxpage", maxpage.ToString ());
System.Xml.XmlElement xmlEl;
foreach (MidiDev dev in knowndevices.Values) {
el.AppendChild (xmlEl = parent.OwnerDocument.CreateElement ("MidiDev"));
xmlEl.SetAttribute ("name", dev.Name);
xmlEl.SetAttribute ("feedback", dev.HasFeedback.ToString ());
}
foreach (byte ch in unpaginatedchannels) {
el.AppendChild (xmlEl = parent.OwnerDocument.CreateElement ("UPC"));
xmlEl.SetAttribute ("ch", ch.ToString());
}
}
public void Load (System.Xml.XmlElement el)
{
maxpage = uint.Parse (el.TryGetAttribute ("maxpage", "8"));
foreach (var xd in el.GetElementsByTagName("MidiDev")) {
System.Xml.XmlElement xdev = xd as System.Xml.XmlElement;
string name = xdev.GetAttribute ("name");
if (!knowndevices.ContainsKey (name))
knowndevices.Add (name, new MidiDev (name));
knowndevices [name].HasFeedback = bool.Parse (xdev.TryGetAttribute ("feedback", "false"));
}
unpaginatedchannels.Clear();
foreach (var xu in el.GetElementsByTagName("UPC")) {
System.Xml.XmlElement xupc = xu as System.Xml.XmlElement;
unpaginatedchannels.Add(byte.Parse(xupc.GetAttribute("ch")));
}
AutoConnect();
}
} }
} }

View file

@ -273,7 +273,9 @@ namespace DMX2
{ {
Circuit c = state as Circuit; Circuit c = state as Circuit;
sequenceur.BindCircuitEvent(c,eventId); sequenceur.BindCircuitEvent(c,eventId);
#if DEBUG
Console.WriteLine("{0} bound to {1}", c, eventId ); Console.WriteLine("{0} bound to {1}", c, eventId );
#endif
} }
void MasterPopup (object sender, ContextMenuEventArgs e) void MasterPopup (object sender, ContextMenuEventArgs e)

View file

@ -158,6 +158,7 @@ namespace DMX2
if ((data.prev_value != val) if ((data.prev_value != val)
&& ((data.prev_value < val && data.value < val) || && ((data.prev_value < val && data.value < val) ||
(data.prev_value > val && data.value > val))) { (data.prev_value > val && data.value > val))) {
attache = false;
return true; return true;
} }

View file

@ -9,9 +9,11 @@ namespace DMX2
private global::Gtk.Alignment GtkAlignment3; private global::Gtk.Alignment GtkAlignment3;
private global::Gtk.VBox vbox4; private global::Gtk.VBox vbox4;
private global::Gtk.HBox hbox1; private global::Gtk.HBox hbox1;
private global::Gtk.SpinButton spinNbPage;
private global::Gtk.Label label3; private global::Gtk.Label label3;
private global::Gtk.CheckButton chkNoChanZero; private global::Gtk.SpinButton spinNbPage;
private global::Gtk.HBox hbox2;
private global::Gtk.Label label4;
private global::Gtk.SpinButton spinUPCh;
private global::Gtk.Label GtkLabel5; private global::Gtk.Label GtkLabel5;
private global::Gtk.Frame frame3; private global::Gtk.Frame frame3;
private global::Gtk.Alignment GtkAlignment2; private global::Gtk.Alignment GtkAlignment2;
@ -64,7 +66,17 @@ namespace DMX2
this.hbox1.Name = "hbox1"; this.hbox1.Name = "hbox1";
this.hbox1.Spacing = 6; this.hbox1.Spacing = 6;
// Container child hbox1.Gtk.Box+BoxChild // Container child hbox1.Gtk.Box+BoxChild
this.spinNbPage = new global::Gtk.SpinButton (1, 32, 1); this.label3 = new global::Gtk.Label ();
this.label3.Name = "label3";
this.label3.Xalign = 0F;
this.label3.LabelProp = "Nombre de pages";
this.hbox1.Add (this.label3);
global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label3]));
w2.Position = 0;
w2.Expand = false;
w2.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.spinNbPage = new global::Gtk.SpinButton (1, 99, 1);
this.spinNbPage.CanFocus = true; this.spinNbPage.CanFocus = true;
this.spinNbPage.Name = "spinNbPage"; this.spinNbPage.Name = "spinNbPage";
this.spinNbPage.Adjustment.PageIncrement = 10; this.spinNbPage.Adjustment.PageIncrement = 10;
@ -72,18 +84,7 @@ namespace DMX2
this.spinNbPage.Numeric = true; this.spinNbPage.Numeric = true;
this.spinNbPage.Value = 8; this.spinNbPage.Value = 8;
this.hbox1.Add (this.spinNbPage); this.hbox1.Add (this.spinNbPage);
global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.spinNbPage])); global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.spinNbPage]));
w2.PackType = ((global::Gtk.PackType)(1));
w2.Position = 0;
w2.Expand = false;
w2.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.label3 = new global::Gtk.Label ();
this.label3.Name = "label3";
this.label3.Xalign = 1F;
this.label3.LabelProp = "Nombre de pages";
this.hbox1.Add (this.label3);
global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label3]));
w3.PackType = ((global::Gtk.PackType)(1)); w3.PackType = ((global::Gtk.PackType)(1));
w3.Position = 1; w3.Position = 1;
w3.Expand = false; w3.Expand = false;
@ -94,17 +95,37 @@ namespace DMX2
w4.Expand = false; w4.Expand = false;
w4.Fill = false; w4.Fill = false;
// Container child vbox4.Gtk.Box+BoxChild // Container child vbox4.Gtk.Box+BoxChild
this.chkNoChanZero = new global::Gtk.CheckButton (); this.hbox2 = new global::Gtk.HBox ();
this.chkNoChanZero.CanFocus = true; this.hbox2.Name = "hbox2";
this.chkNoChanZero.Name = "chkNoChanZero"; this.hbox2.Spacing = 6;
this.chkNoChanZero.Label = "Ne pas paginer\nle canal midi 1"; // Container child hbox2.Gtk.Box+BoxChild
this.chkNoChanZero.DrawIndicator = true; this.label4 = new global::Gtk.Label ();
this.chkNoChanZero.UseUnderline = true; this.label4.Name = "label4";
this.vbox4.Add (this.chkNoChanZero); this.label4.Xalign = 0F;
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.chkNoChanZero])); this.label4.LabelProp = "Ne pas paginer\nce canal :";
w5.Position = 1; this.hbox2.Add (this.label4);
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label4]));
w5.Position = 0;
w5.Expand = false; w5.Expand = false;
w5.Fill = false; w5.Fill = false;
// Container child hbox2.Gtk.Box+BoxChild
this.spinUPCh = new global::Gtk.SpinButton (0, 16, 1);
this.spinUPCh.CanFocus = true;
this.spinUPCh.Name = "spinUPCh";
this.spinUPCh.Adjustment.PageIncrement = 10;
this.spinUPCh.ClimbRate = 1;
this.spinUPCh.Numeric = true;
this.hbox2.Add (this.spinUPCh);
global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.spinUPCh]));
w6.PackType = ((global::Gtk.PackType)(1));
w6.Position = 1;
w6.Expand = false;
w6.Fill = false;
this.vbox4.Add (this.hbox2);
global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.hbox2]));
w7.Position = 1;
w7.Expand = false;
w7.Fill = false;
this.GtkAlignment3.Add (this.vbox4); this.GtkAlignment3.Add (this.vbox4);
this.frame2.Add (this.GtkAlignment3); this.frame2.Add (this.GtkAlignment3);
this.GtkLabel5 = new global::Gtk.Label (); this.GtkLabel5 = new global::Gtk.Label ();
@ -113,9 +134,9 @@ namespace DMX2
this.GtkLabel5.UseMarkup = true; this.GtkLabel5.UseMarkup = true;
this.frame2.LabelWidget = this.GtkLabel5; this.frame2.LabelWidget = this.GtkLabel5;
this.table1.Add (this.frame2); this.table1.Add (this.frame2);
global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1 [this.frame2])); global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1 [this.frame2]));
w8.XOptions = ((global::Gtk.AttachOptions)(4)); w10.XOptions = ((global::Gtk.AttachOptions)(4));
w8.YOptions = ((global::Gtk.AttachOptions)(4)); w10.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild // Container child table1.Gtk.Table+TableChild
this.frame3 = new global::Gtk.Frame (); this.frame3 = new global::Gtk.Frame ();
this.frame3.Name = "frame3"; this.frame3.Name = "frame3";
@ -137,10 +158,10 @@ namespace DMX2
this.chkFB.DrawIndicator = true; this.chkFB.DrawIndicator = true;
this.chkFB.UseUnderline = true; this.chkFB.UseUnderline = true;
this.vbox5.Add (this.chkFB); this.vbox5.Add (this.chkFB);
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.chkFB])); global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.chkFB]));
w9.Position = 0; w11.Position = 0;
w9.Expand = false; w11.Expand = false;
w9.Fill = false; w11.Fill = false;
this.GtkAlignment2.Add (this.vbox5); this.GtkAlignment2.Add (this.vbox5);
this.frame3.Add (this.GtkAlignment2); this.frame3.Add (this.GtkAlignment2);
this.GtkLabel3 = new global::Gtk.Label (); this.GtkLabel3 = new global::Gtk.Label ();
@ -149,11 +170,11 @@ namespace DMX2
this.GtkLabel3.UseMarkup = true; this.GtkLabel3.UseMarkup = true;
this.frame3.LabelWidget = this.GtkLabel3; this.frame3.LabelWidget = this.GtkLabel3;
this.table1.Add (this.frame3); this.table1.Add (this.frame3);
global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1 [this.frame3])); global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1 [this.frame3]));
w12.TopAttach = ((uint)(2)); w14.TopAttach = ((uint)(2));
w12.BottomAttach = ((uint)(3)); w14.BottomAttach = ((uint)(3));
w12.XOptions = ((global::Gtk.AttachOptions)(4)); w14.XOptions = ((global::Gtk.AttachOptions)(4));
w12.YOptions = ((global::Gtk.AttachOptions)(4)); w14.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild // Container child table1.Gtk.Table+TableChild
this.hbuttonbox2 = new global::Gtk.HButtonBox (); this.hbuttonbox2 = new global::Gtk.HButtonBox ();
this.hbuttonbox2.Name = "hbuttonbox2"; this.hbuttonbox2.Name = "hbuttonbox2";
@ -164,25 +185,25 @@ namespace DMX2
this.btnActiv.Name = "btnActiv"; this.btnActiv.Name = "btnActiv";
this.btnActiv.UseUnderline = true; this.btnActiv.UseUnderline = true;
// Container child btnActiv.Gtk.Container+ContainerChild // Container child btnActiv.Gtk.Container+ContainerChild
global::Gtk.Alignment w13 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); global::Gtk.Alignment w15 = 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 w14 = new global::Gtk.HBox (); global::Gtk.HBox w16 = new global::Gtk.HBox ();
w14.Spacing = 2; w16.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild // Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w15 = new global::Gtk.Image (); global::Gtk.Image w17 = new global::Gtk.Image ();
w15.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-down", global::Gtk.IconSize.Menu); w17.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-down", global::Gtk.IconSize.Menu);
w14.Add (w15); w16.Add (w17);
// Container child GtkHBox.Gtk.Container+ContainerChild // Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w17 = new global::Gtk.Label (); global::Gtk.Label w19 = new global::Gtk.Label ();
w17.LabelProp = "Activer"; w19.LabelProp = "Activer";
w17.UseUnderline = true; w19.UseUnderline = true;
w14.Add (w17); w16.Add (w19);
w13.Add (w14); w15.Add (w16);
this.btnActiv.Add (w13); this.btnActiv.Add (w15);
this.hbuttonbox2.Add (this.btnActiv); this.hbuttonbox2.Add (this.btnActiv);
global::Gtk.ButtonBox.ButtonBoxChild w21 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.btnActiv])); global::Gtk.ButtonBox.ButtonBoxChild w23 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.btnActiv]));
w21.Expand = false; w23.Expand = false;
w21.Fill = false; w23.Fill = false;
// Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild
this.btnDesactiv = new global::Gtk.Button (); this.btnDesactiv = new global::Gtk.Button ();
this.btnDesactiv.Sensitive = false; this.btnDesactiv.Sensitive = false;
@ -190,34 +211,34 @@ namespace DMX2
this.btnDesactiv.Name = "btnDesactiv"; this.btnDesactiv.Name = "btnDesactiv";
this.btnDesactiv.UseUnderline = true; this.btnDesactiv.UseUnderline = true;
// Container child btnDesactiv.Gtk.Container+ContainerChild // Container child btnDesactiv.Gtk.Container+ContainerChild
global::Gtk.Alignment w22 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); global::Gtk.Alignment w24 = 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 w23 = new global::Gtk.HBox (); global::Gtk.HBox w25 = new global::Gtk.HBox ();
w23.Spacing = 2; w25.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild // Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w24 = new global::Gtk.Image (); global::Gtk.Image w26 = new global::Gtk.Image ();
w24.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-up", global::Gtk.IconSize.Menu); w26.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-up", global::Gtk.IconSize.Menu);
w23.Add (w24); w25.Add (w26);
// Container child GtkHBox.Gtk.Container+ContainerChild // Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w26 = new global::Gtk.Label (); global::Gtk.Label w28 = new global::Gtk.Label ();
w26.LabelProp = "Désactiver"; w28.LabelProp = "Désactiver";
w26.UseUnderline = true; w28.UseUnderline = true;
w23.Add (w26); w25.Add (w28);
w22.Add (w23); w24.Add (w25);
this.btnDesactiv.Add (w22); this.btnDesactiv.Add (w24);
this.hbuttonbox2.Add (this.btnDesactiv); this.hbuttonbox2.Add (this.btnDesactiv);
global::Gtk.ButtonBox.ButtonBoxChild w30 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.btnDesactiv])); global::Gtk.ButtonBox.ButtonBoxChild w32 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.btnDesactiv]));
w30.Position = 1; w32.Position = 1;
w30.Expand = false; w32.Expand = false;
w30.Fill = false; w32.Fill = false;
this.table1.Add (this.hbuttonbox2); this.table1.Add (this.hbuttonbox2);
global::Gtk.Table.TableChild w31 = ((global::Gtk.Table.TableChild)(this.table1 [this.hbuttonbox2])); global::Gtk.Table.TableChild w33 = ((global::Gtk.Table.TableChild)(this.table1 [this.hbuttonbox2]));
w31.TopAttach = ((uint)(1)); w33.TopAttach = ((uint)(1));
w31.BottomAttach = ((uint)(2)); w33.BottomAttach = ((uint)(2));
w31.LeftAttach = ((uint)(1)); w33.LeftAttach = ((uint)(1));
w31.RightAttach = ((uint)(2)); w33.RightAttach = ((uint)(2));
w31.XOptions = ((global::Gtk.AttachOptions)(0)); w33.XOptions = ((global::Gtk.AttachOptions)(0));
w31.YOptions = ((global::Gtk.AttachOptions)(4)); w33.YOptions = ((global::Gtk.AttachOptions)(4));
// Container child table1.Gtk.Table+TableChild // Container child table1.Gtk.Table+TableChild
this.vbox2 = new global::Gtk.VBox (); this.vbox2 = new global::Gtk.VBox ();
this.vbox2.Name = "vbox2"; this.vbox2.Name = "vbox2";
@ -228,10 +249,10 @@ namespace DMX2
this.label1.Xalign = 0F; this.label1.Xalign = 0F;
this.label1.LabelProp = "Interfaces disponibles :"; this.label1.LabelProp = "Interfaces disponibles :";
this.vbox2.Add (this.label1); this.vbox2.Add (this.label1);
global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label1])); global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label1]));
w32.Position = 0; w34.Position = 0;
w32.Expand = false; w34.Expand = false;
w32.Fill = false; w34.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild // Container child vbox2.Gtk.Box+BoxChild
this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.Name = "GtkScrolledWindow";
@ -243,12 +264,12 @@ namespace DMX2
this.listDetect.HeadersVisible = false; this.listDetect.HeadersVisible = false;
this.GtkScrolledWindow.Add (this.listDetect); this.GtkScrolledWindow.Add (this.listDetect);
this.vbox2.Add (this.GtkScrolledWindow); this.vbox2.Add (this.GtkScrolledWindow);
global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow])); global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow]));
w34.Position = 1; w36.Position = 1;
this.table1.Add (this.vbox2); this.table1.Add (this.vbox2);
global::Gtk.Table.TableChild w35 = ((global::Gtk.Table.TableChild)(this.table1 [this.vbox2])); global::Gtk.Table.TableChild w37 = ((global::Gtk.Table.TableChild)(this.table1 [this.vbox2]));
w35.LeftAttach = ((uint)(1)); w37.LeftAttach = ((uint)(1));
w35.RightAttach = ((uint)(2)); w37.RightAttach = ((uint)(2));
// Container child table1.Gtk.Table+TableChild // Container child table1.Gtk.Table+TableChild
this.vbox3 = new global::Gtk.VBox (); this.vbox3 = new global::Gtk.VBox ();
this.vbox3.Name = "vbox3"; this.vbox3.Name = "vbox3";
@ -259,10 +280,10 @@ namespace DMX2
this.label2.Xalign = 0F; this.label2.Xalign = 0F;
this.label2.LabelProp = "Interfaces selectionnées : "; this.label2.LabelProp = "Interfaces selectionnées : ";
this.vbox3.Add (this.label2); this.vbox3.Add (this.label2);
global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.label2])); global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.label2]));
w36.Position = 0; w38.Position = 0;
w36.Expand = false; w38.Expand = false;
w36.Fill = false; w38.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild // Container child vbox3.Gtk.Box+BoxChild
this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow (); this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
this.GtkScrolledWindow1.Name = "GtkScrolledWindow1"; this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
@ -274,23 +295,23 @@ namespace DMX2
this.listKnown.HeadersVisible = false; this.listKnown.HeadersVisible = false;
this.GtkScrolledWindow1.Add (this.listKnown); this.GtkScrolledWindow1.Add (this.listKnown);
this.vbox3.Add (this.GtkScrolledWindow1); this.vbox3.Add (this.GtkScrolledWindow1);
global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.GtkScrolledWindow1])); global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.GtkScrolledWindow1]));
w38.Position = 1; w40.Position = 1;
this.table1.Add (this.vbox3); this.table1.Add (this.vbox3);
global::Gtk.Table.TableChild w39 = ((global::Gtk.Table.TableChild)(this.table1 [this.vbox3])); global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table1 [this.vbox3]));
w39.TopAttach = ((uint)(2)); w41.TopAttach = ((uint)(2));
w39.BottomAttach = ((uint)(3)); w41.BottomAttach = ((uint)(3));
w39.LeftAttach = ((uint)(1)); w41.LeftAttach = ((uint)(1));
w39.RightAttach = ((uint)(2)); w41.RightAttach = ((uint)(2));
w1.Add (this.table1); w1.Add (this.table1);
global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(w1 [this.table1])); global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(w1 [this.table1]));
w40.Position = 0; w42.Position = 0;
// Internal child DMX2.GestionMidiUI.ActionArea // Internal child DMX2.GestionMidiUI.ActionArea
global::Gtk.HButtonBox w41 = this.ActionArea; global::Gtk.HButtonBox w43 = this.ActionArea;
w41.Name = "dialog1_ActionArea"; w43.Name = "dialog1_ActionArea";
w41.Spacing = 10; w43.Spacing = 10;
w41.BorderWidth = ((uint)(5)); w43.BorderWidth = ((uint)(5));
w41.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); w43.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonClose = new global::Gtk.Button (); this.buttonClose = new global::Gtk.Button ();
this.buttonClose.CanDefault = true; this.buttonClose.CanDefault = true;
@ -300,9 +321,9 @@ namespace DMX2
this.buttonClose.UseUnderline = true; this.buttonClose.UseUnderline = true;
this.buttonClose.Label = "gtk-close"; this.buttonClose.Label = "gtk-close";
this.AddActionWidget (this.buttonClose, -7); this.AddActionWidget (this.buttonClose, -7);
global::Gtk.ButtonBox.ButtonBoxChild w42 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w41 [this.buttonClose])); global::Gtk.ButtonBox.ButtonBoxChild w44 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w43 [this.buttonClose]));
w42.Expand = false; w44.Expand = false;
w42.Fill = false; w44.Fill = false;
if ((this.Child != null)) { if ((this.Child != null)) {
this.Child.ShowAll (); this.Child.ShowAll ();
} }
@ -315,7 +336,7 @@ namespace DMX2
this.btnDesactiv.Clicked += new global::System.EventHandler (this.OnBtnDesactivClicked); this.btnDesactiv.Clicked += new global::System.EventHandler (this.OnBtnDesactivClicked);
this.chkFB.Toggled += new global::System.EventHandler (this.OnChkFBToggled); this.chkFB.Toggled += new global::System.EventHandler (this.OnChkFBToggled);
this.spinNbPage.ValueChanged += new global::System.EventHandler (this.OnSpinNbPageValueChanged); this.spinNbPage.ValueChanged += new global::System.EventHandler (this.OnSpinNbPageValueChanged);
this.chkNoChanZero.Toggled += new global::System.EventHandler (this.OnChkNoChanZeroToggled); this.spinUPCh.ValueChanged += new global::System.EventHandler (this.OnSpinUPChValueChanged);
this.buttonClose.Clicked += new global::System.EventHandler (this.OnButtonCloseClicked); this.buttonClose.Clicked += new global::System.EventHandler (this.OnButtonCloseClicked);
} }
} }

View file

@ -3166,12 +3166,25 @@ trames DMX (ms)</property>
<widget class="Gtk.HBox" id="hbox1"> <widget class="Gtk.HBox" id="hbox1">
<property name="MemberName" /> <property name="MemberName" />
<property name="Spacing">6</property> <property name="Spacing">6</property>
<child>
<widget class="Gtk.Label" id="label3">
<property name="MemberName" />
<property name="Xalign">0</property>
<property name="LabelProp" translatable="yes">Nombre de pages</property>
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">False</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child> <child>
<widget class="Gtk.SpinButton" id="spinNbPage"> <widget class="Gtk.SpinButton" id="spinNbPage">
<property name="MemberName" /> <property name="MemberName" />
<property name="CanFocus">True</property> <property name="CanFocus">True</property>
<property name="Lower">1</property> <property name="Lower">1</property>
<property name="Upper">32</property> <property name="Upper">99</property>
<property name="PageIncrement">10</property> <property name="PageIncrement">10</property>
<property name="StepIncrement">1</property> <property name="StepIncrement">1</property>
<property name="ClimbRate">1</property> <property name="ClimbRate">1</property>
@ -3181,6 +3194,14 @@ trames DMX (ms)</property>
</widget> </widget>
<packing> <packing>
<property name="PackType">End</property> <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="Position">0</property>
<property name="AutoSize">True</property> <property name="AutoSize">True</property>
<property name="Expand">False</property> <property name="Expand">False</property>
@ -3188,37 +3209,42 @@ trames DMX (ms)</property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="Gtk.Label" id="label3"> <widget class="Gtk.HBox" id="hbox2">
<property name="MemberName" /> <property name="MemberName" />
<property name="Xalign">1</property> <property name="Spacing">6</property>
<property name="LabelProp" translatable="yes">Nombre de pages</property> <child>
<widget class="Gtk.Label" id="label4">
<property name="MemberName" />
<property name="Xalign">0</property>
<property name="LabelProp" translatable="yes">Ne pas paginer
ce canal :</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.SpinButton" id="spinUPCh">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Upper">16</property>
<property name="PageIncrement">10</property>
<property name="StepIncrement">1</property>
<property name="ClimbRate">1</property>
<property name="Numeric">True</property>
<signal name="ValueChanged" handler="OnSpinUPChValueChanged" />
</widget> </widget>
<packing> <packing>
<property name="PackType">End</property> <property name="PackType">End</property>
<property name="Position">1</property> <property name="Position">1</property>
<property name="AutoSize">False</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="AutoSize">True</property>
<property name="Expand">False</property> <property name="Expand">False</property>
<property name="Fill">False</property> <property name="Fill">False</property>
</packing> </packing>
</child> </child>
<child>
<widget class="Gtk.CheckButton" id="chkNoChanZero">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Label" translatable="yes">Ne pas paginer
le canal midi 1</property>
<property name="DrawIndicator">True</property>
<property name="HasLabel">True</property>
<property name="UseUnderline">True</property>
<signal name="Toggled" handler="OnChkNoChanZeroToggled" />
</widget> </widget>
<packing> <packing>
<property name="Position">1</property> <property name="Position">1</property>