diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c807e6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +DMX-2.0.userprefs +DMX-2.0/bin/ +DMX-2.0/obj/ +.vs \ No newline at end of file diff --git a/DMX-2.0/AlsaSeqLib.Invoke.cs b/DMX-2.0/AlsaSeqLib.Invoke.cs index bdb6be1..7b06c9c 100644 --- a/DMX-2.0/AlsaSeqLib.Invoke.cs +++ b/DMX-2.0/AlsaSeqLib.Invoke.cs @@ -6,7 +6,7 @@ namespace DMX2 public static partial class AlsaSeqLib { - public static class Invoke + static class Invoke { const string ASOUND_LIB_NAME = "libasound.so.2"; @@ -26,6 +26,9 @@ namespace DMX2 [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern int snd_seq_create_simple_port (IntPtr seq, string name, uint caps, uint type); + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] + public static extern int snd_seq_delete_simple_port (IntPtr seq, int port); + [DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)] public static extern int snd_seq_event_input (IntPtr seq, out IntPtr ev); diff --git a/DMX-2.0/AlsaSeqLib.MidiPort.cs b/DMX-2.0/AlsaSeqLib.MidiPort.cs new file mode 100644 index 0000000..4a7c656 --- /dev/null +++ b/DMX-2.0/AlsaSeqLib.MidiPort.cs @@ -0,0 +1,129 @@ +using System; +using System.Runtime.InteropServices; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Collections.Concurrent; + +namespace DMX2 +{ + public static partial class AlsaSeqLib + { public class MidiPort : IDisposable + { + internal ConcurrentQueue eventqueue = new ConcurrentQueue (); + + internal int portid; + public MidiPort(string portname){ + portid=Invoke.snd_seq_create_simple_port (seq_handle.Handle, + portname, + SND_SEQ_PORT_CAP_WRITE + + SND_SEQ_PORT_CAP_SUBS_WRITE + + SND_SEQ_PORT_CAP_READ + + SND_SEQ_PORT_CAP_SUBS_READ + , + SND_SEQ_PORT_TYPE_APPLICATION + ); + openports[portid]=this; + } + + bool closed = false; + public void Close() + { + if (closed) + return; + closed = true; + + Invoke.snd_seq_delete_simple_port (seq_handle.Handle, + portid); + + if(openports.ContainsKey(portid)) + if (openports [portid] == this) + openports.Remove (portid); + } + + void IDisposable.Dispose(){ + Close (); + } + + public void SendEvent(snd_seq_event_t ev){ + if (seq_handle == null) + throw new InvalidOperationException (); + + ev.source.client = (byte)clientId; + ev.source.port = (byte)portid; + ev.dest.client = SND_SEQ_ADDRESS_SUBSCRIBERS; + ev.dest.port = SND_SEQ_ADDRESS_UNKNOWN; + ev.queue = SND_SEQ_QUEUE_DIRECT; + + Marshal.StructureToPtr (ev, evOutPtr.Pointer, false); + Invoke.snd_seq_event_output (seq_handle.Handle, evOutPtr.Pointer); + Invoke.snd_seq_drain_output (seq_handle.Handle); + + } + + public bool GetEvent(out snd_seq_event_t ev){ + return eventqueue.TryDequeue (out ev); + } + + public bool ConnectTo(Port p){ + if (seq_handle == null) + throw new InvalidOperationException (); + return Invoke.snd_seq_connect_to (seq_handle.Handle, portid, p.ClientId, p.PortId) == 0; + } + + /*internal bool ConnectTo(int client, int port){ + if (seq_handle == null) + throw new InvalidOperationException (); + return Invoke.snd_seq_connect_to (seq_handle.Handle, portid, client, port) == 0; + }*/ + + public bool ConnectFrom(Port p){ + if (seq_handle == null) + throw new InvalidOperationException (); + return Invoke.snd_seq_connect_from (seq_handle.Handle, portid, p.ClientId, p.PortId) == 0; + } + + public void Deconnecte(Port p){ + if (seq_handle == null) + throw new InvalidOperationException (); + snd_seq_addr_t local = new snd_seq_addr_t (); + local.client = (byte)clientId; + local.port = (byte)portid; + + snd_seq_addr_t addr; + using (PointerWrapper subqueryInfo = new PointerWrapper(GetQuerySubscribeInfoSize())) + using (PointerWrapper localAddr =new PointerWrapper(local.SndSeqAddrToPtr())) { + Invoke.snd_seq_query_subscribe_set_root (subqueryInfo.Pointer, localAddr.Pointer); + Invoke.snd_seq_query_subscribe_set_type (subqueryInfo.Pointer, SND_SEQ_QUERY_SUBS_WRITE); + + for (Invoke.snd_seq_query_subscribe_set_index(subqueryInfo.Pointer,0); + Invoke.snd_seq_query_port_subscribers (seq_handle.Handle,subqueryInfo.Pointer)>=0; + Invoke.snd_seq_query_subscribe_set_index(subqueryInfo.Pointer, + Invoke.snd_seq_query_subscribe_get_index(subqueryInfo.Pointer) +1) + ) { + addr = Invoke.snd_seq_query_subscribe_get_addr (subqueryInfo.Pointer).PtrToSndSeqAddr (); + + if (addr.client != p.ClientId || addr.port != p.PortId) + continue; + + Invoke.snd_seq_disconnect_from (seq_handle.Handle, portid, p.ClientId, p.PortId); + } + + Invoke.snd_seq_query_subscribe_set_type (subqueryInfo.Pointer, SND_SEQ_QUERY_SUBS_READ); + + for (Invoke.snd_seq_query_subscribe_set_index(subqueryInfo.Pointer,0); + Invoke.snd_seq_query_port_subscribers (seq_handle.Handle,subqueryInfo.Pointer)>=0; + Invoke.snd_seq_query_subscribe_set_index(subqueryInfo.Pointer, + Invoke.snd_seq_query_subscribe_get_index(subqueryInfo.Pointer) +1) + ) { + addr = Invoke.snd_seq_query_subscribe_get_addr (subqueryInfo.Pointer).PtrToSndSeqAddr (); + if (addr.client != p.ClientId || addr.port != p.PortId) + continue; + Invoke.snd_seq_disconnect_to (seq_handle.Handle, portid, p.ClientId, p.PortId); + } + } + } + + + } + } +} diff --git a/DMX-2.0/AlsaSeqLib.Wrappers.cs b/DMX-2.0/AlsaSeqLib.Wrappers.cs index d0a75f2..eb396e8 100644 --- a/DMX-2.0/AlsaSeqLib.Wrappers.cs +++ b/DMX-2.0/AlsaSeqLib.Wrappers.cs @@ -15,10 +15,10 @@ namespace DMX2 } } - public SeqHandleWrapper () + public SeqHandleWrapper (string appname) { Invoke.snd_seq_open (out _seq, "default", SND_SEQ_OPEN_DUPLEX, 0); - Invoke.snd_seq_set_client_name (_seq, "Loupiottes"); + Invoke.snd_seq_set_client_name (_seq, appname); } ~SeqHandleWrapper () @@ -69,7 +69,7 @@ namespace DMX2 } } } - public static snd_seq_addr_t PtrToSndSeqAddr (this IntPtr ptr) + static snd_seq_addr_t PtrToSndSeqAddr (this IntPtr ptr) { try { return (snd_seq_addr_t)Marshal.PtrToStructure ( @@ -81,7 +81,7 @@ namespace DMX2 } } - public static IntPtr SndSeqAddrToPtr (this snd_seq_addr_t addr) + static IntPtr SndSeqAddrToPtr (this snd_seq_addr_t addr) { IntPtr ptr = typeof(snd_seq_addr_t).Malloc (); Marshal.StructureToPtr (addr, ptr, false); @@ -93,7 +93,7 @@ namespace DMX2 return Marshal.AllocHGlobal (Marshal.SizeOf (type)); } - public static string PtrToString (this IntPtr p) + static string PtrToString (this IntPtr p) { if (p == IntPtr.Zero) { return null; diff --git a/DMX-2.0/AlsaSeqLib.cs b/DMX-2.0/AlsaSeqLib.cs index d03e092..93fd5de 100644 --- a/DMX-2.0/AlsaSeqLib.cs +++ b/DMX-2.0/AlsaSeqLib.cs @@ -9,9 +9,19 @@ namespace DMX2 { static SeqHandleWrapper seq_handle = null; static int clientId; - static int inport; - static int outport; + //static int inport; + //static int outport; + static System.Threading.Thread eventthread = null; + //static MidiPort systemPort = null; + + static internal Dictionary openports = new Dictionary(); + + public static int ClientId{ + get { + return clientId; + } + } public class Client { @@ -55,17 +65,18 @@ namespace DMX2 Invoke.snd_seq_port_info_set_client (portInfo.Pointer, id); Invoke.snd_seq_port_info_set_port (portInfo.Pointer, -1); while (Invoke.snd_seq_query_next_port(seq_handle.Handle, portInfo.Pointer) >= 0) { - ports.Add (new Port (portInfo)); + ports.Add (Port.GetPort(portInfo)); } } } } - public static int ClientId { + /*public static int ClientId { get { return clientId; } - } + }*/ + public class Port { int portId; @@ -73,6 +84,7 @@ namespace DMX2 string name; uint caps; uint type; + int srcid; public int ClientId { get { @@ -104,36 +116,70 @@ namespace DMX2 } } - internal Port (PointerWrapper portInfo) + public int SrcId + { + get + { + return srcid; + } + } + + private Port(int _clientId, int _portId) + { + clientId = _clientId; + portId = _portId; + srcid = clientId << 8 + portId; + ports.Add(srcid, this); + } + + private void Updateinfo (PointerWrapper portInfo) { - clientId = Invoke.snd_seq_port_info_get_client (portInfo.Pointer); - portId = Invoke.snd_seq_port_info_get_port (portInfo.Pointer); IntPtr namePtr = Invoke.snd_seq_port_info_get_name (portInfo.Pointer); caps = Invoke.snd_seq_port_info_get_capability (portInfo.Pointer); type = Invoke.snd_seq_port_info_get_type (portInfo.Pointer); name = namePtr.PtrToString (); } + + internal static Port GetPort(PointerWrapper portInfo) + { + Port p; + int clientId = Invoke.snd_seq_port_info_get_client(portInfo.Pointer); + int portId = Invoke.snd_seq_port_info_get_port(portInfo.Pointer); + int srcid = clientId << 8 + portId; + + if (ports.ContainsKey(srcid)) + p = ports[srcid]; + else + p = new Port(clientId, portId); + + p.Updateinfo(portInfo); + return p; + } + internal static Port GetPort(int clientId, int portId) + { + int srcid = clientId << 8 + portId; + if (ports.ContainsKey(srcid)) + return ports[srcid]; + return null; + } + + static Dictionary ports = new Dictionary(); } - public static void Init () + public static void Init (string appname) { if (seq_handle != null) return; - seq_handle = new SeqHandleWrapper (); + seq_handle = new SeqHandleWrapper (appname); clientId = Invoke.snd_seq_client_id (seq_handle.Handle); - outport = inport = Invoke.snd_seq_create_simple_port (seq_handle.Handle, - "midi_in_out", - SND_SEQ_PORT_CAP_WRITE - //+ SND_SEQ_PORT_CAP_SUBS_WRITE - + SND_SEQ_PORT_CAP_READ - + SND_SEQ_PORT_CAP_SUBS_READ - , - SND_SEQ_PORT_TYPE_APPLICATION - ); - + System.Threading.ThreadStart ts = new System.Threading.ThreadStart (EventLoop); + eventthread = new System.Threading.Thread (ts); + eventthread.Start(); + //systemPort = new MidiPort ("system"); + //systemPort.ConnectTo (SND_SEQ_CLIENT_SYSTEM, SND_SEQ_PORT_SYSTEM_ANNOUNCE); } public static void Close () @@ -144,7 +190,34 @@ namespace DMX2 seq_handle = null; } - public static bool GetEvent (out snd_seq_event_t ev) + public static void EventLoop(){ + snd_seq_event_t ev = new snd_seq_event_t ();; + while (seq_handle != null) { + while (seq_handle != null && Invoke.snd_seq_event_input_pending (seq_handle.Handle, 1) > 0) { + IntPtr evPtr; + // Recup du pointeur vers l'ev + Invoke.snd_seq_event_input (seq_handle.Handle, out evPtr); + // Copie de la zone mémoire dans une structure managee + ev = (snd_seq_event_t)Marshal.PtrToStructure (evPtr, typeof(snd_seq_event_t)); + // liberation du pointeur + Invoke.snd_seq_free_event (evPtr); + + /*if (ev.dest.port == systemPort.portid) { + if (ev.type == AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_START) { + + } + } else {*/ + // queue + if (openports.ContainsKey (ev.dest.port)) { + openports [ev.dest.port].eventqueue.Enqueue (ev); + } + //} + } + System.Threading.Thread.Sleep (1); + } + } + + /*static bool GetEvent (out snd_seq_event_t ev) { if (seq_handle == null) throw new InvalidOperationException (); @@ -167,31 +240,10 @@ namespace DMX2 return true; - } + }*/ static PointerWrapper evOutPtr = new PointerWrapper (32); - public static void SendEvent (snd_seq_event_t ev) - { - if (seq_handle == null) - throw new InvalidOperationException (); - ev.queue = SND_SEQ_QUEUE_DIRECT; - ev.source.client = (byte)clientId; - ev.source.port = (byte)outport; - Marshal.StructureToPtr (ev, evOutPtr.Pointer, false); - Invoke.snd_seq_event_output (seq_handle.Handle, evOutPtr.Pointer); - Invoke.snd_seq_drain_output (seq_handle.Handle); - } - - public static void SendEventToSubscribers (snd_seq_event_t ev) - { - if (seq_handle == null) - throw new InvalidOperationException (); - ev.dest.client = SND_SEQ_ADDRESS_SUBSCRIBERS; - ev.dest.port = SND_SEQ_ADDRESS_UNKNOWN; - SendEvent (ev); - } - public static IEnumerable EnumClients () { if (seq_handle == null) @@ -216,119 +268,18 @@ namespace DMX2 } } - public static Port GetPortByIDs (int client, int port) + public static Port GetPortByIDs (int clientid, int portid) { if (seq_handle == null) throw new InvalidOperationException (); using (PointerWrapper portInfo = new PointerWrapper(GetPortInfoSize ())) { - if (Invoke.snd_seq_get_any_port_info (seq_handle.Handle, client, port, portInfo.Pointer) >= 0) { - return new Port (portInfo); + if (Invoke.snd_seq_get_any_port_info (seq_handle.Handle, clientid, portid, portInfo.Pointer) >= 0) { + return Port.GetPort (portInfo); } else - return null; + return Port.GetPort (clientid,portid); } } - 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 isOutput = (port.Caps & SND_SEQ_PORT_CAP_READ) == SND_SEQ_PORT_CAP_READ; - - if (isInput) - if (!ConnectTo (port.ClientId, port.PortId)) - return false; - - if (isOutput) - if (!ConnectFrom (port.ClientId, port.PortId)) - return false; - - return true; - } - - 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; - } - - 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; - } - - 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 (); - local.client = (byte)clientId; - local.port = (byte)inport; - - snd_seq_addr_t addr; - using (PointerWrapper subqueryInfo = new PointerWrapper(GetQuerySubscribeInfoSize())) - using (PointerWrapper localAddr =new PointerWrapper(local.SndSeqAddrToPtr())) { - Invoke.snd_seq_query_subscribe_set_root (subqueryInfo.Pointer, localAddr.Pointer); - Invoke.snd_seq_query_subscribe_set_type (subqueryInfo.Pointer, SND_SEQ_QUERY_SUBS_WRITE); - - for (Invoke.snd_seq_query_subscribe_set_index(subqueryInfo.Pointer,0); - Invoke.snd_seq_query_port_subscribers (seq_handle.Handle,subqueryInfo.Pointer)>=0; - Invoke.snd_seq_query_subscribe_set_index(subqueryInfo.Pointer, - Invoke.snd_seq_query_subscribe_get_index(subqueryInfo.Pointer) +1) - ) { - - //root = Invoke.snd_seq_query_subscribe_get_root(subqueryInfo.Pointer).PtrToSndSeqAddr(); - addr = Invoke.snd_seq_query_subscribe_get_addr (subqueryInfo.Pointer).PtrToSndSeqAddr (); - - if (addr.client != client || addr.port != port) - continue; - - Invoke.snd_seq_disconnect_from (seq_handle.Handle, inport, client, port); - - - } - - Invoke.snd_seq_query_subscribe_set_type (subqueryInfo.Pointer, SND_SEQ_QUERY_SUBS_READ); - - for (Invoke.snd_seq_query_subscribe_set_index(subqueryInfo.Pointer,0); - Invoke.snd_seq_query_port_subscribers (seq_handle.Handle,subqueryInfo.Pointer)>=0; - Invoke.snd_seq_query_subscribe_set_index(subqueryInfo.Pointer, - Invoke.snd_seq_query_subscribe_get_index(subqueryInfo.Pointer) +1) - ) { - - //root = Invoke.snd_seq_query_subscribe_get_root(subqueryInfo.Pointer).PtrToSndSeqAddr(); - addr = Invoke.snd_seq_query_subscribe_get_addr (subqueryInfo.Pointer).PtrToSndSeqAddr (); - - if (addr.client != client || addr.port != port) - continue; - - Invoke.snd_seq_disconnect_to (seq_handle.Handle, outport, client, port); - } - } - - } - - - /* - public static void GetConnections() - { - using(PointerWrapper subscribeInfo = new PointerWrapper(GetQuerySubscribeInfoSize())){ - int index=0; - Invoke.snd_seq_query_subscribe_set_client (subscribeInfo.Pointer,clientId); - Invoke.snd_seq_query_subscribe_set_port (subscribeInfo.Pointer,inport); - Invoke.snd_seq_query_subscribe_set_index(subscribeInfo.Pointer,index++); - Invoke.snd_seq_query_subscribe_set_type(subscribeInfo.Pointer,SND_SEQ_QUERY_SUBS_WRITE); - - while (Invoke.snd_seq_query_port_subscribers(seq_handle.Handle,subscribeInfo.Pointer) ==0){ - - //Console.WriteLine("Remote => {0}:{1}",rclient,rport); - Invoke.snd_seq_query_subscribe_set_index(subscribeInfo.Pointer,index++); - } - } - }*/ } } diff --git a/DMX-2.0/DMX-2.0.csproj b/DMX-2.0/DMX-2.0.csproj index 8689edd..1167d22 100644 --- a/DMX-2.0/DMX-2.0.csproj +++ b/DMX-2.0/DMX-2.0.csproj @@ -83,6 +83,11 @@ loupiottes.js loupiottes.js + + + + + @@ -137,6 +142,14 @@ + + + + + + + + @@ -150,4 +163,7 @@ - \ No newline at end of file + + + + diff --git a/DMX-2.0/GestionMidiUI.cs b/DMX-2.0/GestionMidiUI.cs index 80afa71..45c6736 100644 --- a/DMX-2.0/GestionMidiUI.cs +++ b/DMX-2.0/GestionMidiUI.cs @@ -16,7 +16,7 @@ namespace DMX2 this.Build (); lsDetect = new Gtk.ListStore (typeof(string)); - lsKnown = new Gtk.ListStore (typeof(MidiEventProvider.MidiDevice)); + lsKnown = new Gtk.ListStore (typeof(MidiEventProvider.MidiControler)); var nameCol = new Gtk.TreeViewColumn (); @@ -81,7 +81,7 @@ namespace DMX2 void RenderMidiDev (Gtk.TreeViewColumn tree_column, Gtk.CellRenderer cell, Gtk.TreeModel tree_model, Gtk.TreeIter iter) { - MidiEventProvider.MidiDevice dev = tree_model.GetValue (iter, 0) as MidiEventProvider.MidiDevice; + MidiEventProvider.MidiControler dev = tree_model.GetValue (iter, 0) as MidiEventProvider.MidiControler; (cell as Gtk.CellRendererText).Text = dev.ConnectedPorts.Count>0 ?string.Format("{0} ({1} connectés)",dev.Name,dev.ConnectedPorts.Count) :string.Format("{0} (Déconnecté)",dev.Name); @@ -124,7 +124,7 @@ namespace DMX2 chkFB.Sensitive = btnDesactiv.Sensitive = (listKnown.Selection.CountSelectedRows() >0); TreeIter iter; if(!listKnown.Selection.GetSelected(out iter)) return; - MidiEventProvider.MidiDevice dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDevice ; + MidiEventProvider.MidiControler dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiControler ; chkFB.Active = dev.HasFeedback; } @@ -144,7 +144,7 @@ namespace DMX2 { TreeIter iter; if(!listKnown.Selection.GetSelected(out iter)) return; - MidiEventProvider.MidiDevice dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDevice ; + MidiEventProvider.MidiControler dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiControler ; Conduite.Courante.Midi.DisconnectDevice(dev); FillLsDetect () ; FillLsKnown(); @@ -156,7 +156,7 @@ namespace DMX2 { TreeIter iter; if(!listKnown.Selection.GetSelected(out iter)) return; - MidiEventProvider.MidiDevice dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDevice ; + MidiEventProvider.MidiControler dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiControler ; dev.HasFeedback = chkFB.Active; Conduite.Courante.Midi.RefreshFeedback(dev.Name); diff --git a/DMX-2.0/Main.cs b/DMX-2.0/Main.cs index e2fc5cc..dbf6540 100644 --- a/DMX-2.0/Main.cs +++ b/DMX-2.0/Main.cs @@ -60,6 +60,8 @@ namespace DMX2 if (oscEn) osc = new OSCServer (); + AlsaSeqLib.Init ("Loupiottes"); + // Initialisation GTK# Application.Init (); @@ -86,7 +88,7 @@ namespace DMX2 if (openfile != null) win.OpenFile (openfile); - + // Gestion des erreurs non traitées dans l'interface GLib.ExceptionManager.UnhandledException += HandleUnhandledException; @@ -117,9 +119,11 @@ namespace DMX2 Conduite.Courante.Dispose (); } - //if(ws!=null) ws.Dispose(); + if(ws!=null) ws.Dispose(); if(osc!=null) osc.Dispose(); + + AlsaSeqLib.Close (); } static void HandleUnhandledException (GLib.UnhandledExceptionArgs args) diff --git a/DMX-2.0/MainWindow.cs b/DMX-2.0/MainWindow.cs index c7d3771..80dea92 100644 --- a/DMX-2.0/MainWindow.cs +++ b/DMX-2.0/MainWindow.cs @@ -34,6 +34,8 @@ namespace DMX2 int lastSaveHash=0; bool nextChange=false; + Menu midioscMenu; + public string CurFolder{ get; set; @@ -51,7 +53,11 @@ namespace DMX2 Build (); MajWidgets(); - ContextMenuHelper ctxHelper = new ContextMenuHelper(); +#if DEBUG + // selectColorAction2.Visible = true; +#endif + + ContextMenuHelper ctxHelper = new ContextMenuHelper(); ctxHelper.ContextMenu += EventPopup; ctxHelper.AttachToWidget(btnGo); ctxHelper.AttachToWidget(btnGoBack); @@ -71,6 +77,25 @@ namespace DMX2 hpaned2.Add2(seqCtn); hpaned2.ShowAll(); + midioscMenu = new Menu (); + MenuItem midiItem = new MenuItem ("Sequenceur Midi"); + MenuItem oscItem = new MenuItem ("Sequenceur OSC"); + midiItem.ButtonPressEvent+= delegate(object o, ButtonPressEventArgs args) { + Sequenceur s = new SequenceurMidi(); + Conduite.Courante.AjoutSequenceur(s); + AddSeqUI(s); + NextUpdateFull(); + }; + oscItem.ButtonPressEvent+= delegate(object o, ButtonPressEventArgs args) { + Sequenceur s = new SequenceurOSC(); + Conduite.Courante.AjoutSequenceur(s); + AddSeqUI(s); + NextUpdateFull(); + }; + midioscMenu.Add (midiItem); + midioscMenu.Add (oscItem); + midioscMenu.ShowAll (); + } @@ -565,6 +590,16 @@ namespace DMX2 NextUpdateFull(); } + protected void OnSeqMidiActionActivated (object sender, EventArgs e) + { + /* Sequenceur s = new SequenceurMidi(); + Conduite.Courante.AjoutSequenceur(s); + AddSeqUI(s); + NextUpdateFull();*/ + + midioscMenu.Popup (); + } + #endregion #region Gestion de l'affichage @@ -630,7 +665,7 @@ namespace DMX2 btnAjoutLigne.Sensitive = btnRetireLigne.Sensitive = btnGo.Sensitive = btnGoBack.Sensitive = showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive = seqLinAction.Sensitive = seqMacroAction.Sensitive = circAction.Sensitive = saveAction.Sensitive = - btnPause.Sensitive = btnBlackOut.Sensitive = seqSonAction.Sensitive = + btnPause.Sensitive = btnBlackOut.Sensitive = seqSonAction.Sensitive = seqMidiAction.Sensitive = connectAction.Sensitive = midiAction.Sensitive = saveAsAction.Sensitive = closeAction.Sensitive = true; openAction.Sensitive = newAction.Sensitive = false; @@ -642,7 +677,7 @@ namespace DMX2 btnAjoutLigne.Sensitive = btnRetireLigne.Sensitive = btnGo.Sensitive = btnGoBack.Sensitive = showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive = seqLinAction.Sensitive = seqMacroAction.Sensitive = circAction.Sensitive = saveAction.Sensitive = - btnPause.Sensitive = btnBlackOut.Sensitive = seqSonAction.Sensitive = + btnPause.Sensitive = btnBlackOut.Sensitive = seqSonAction.Sensitive = seqMidiAction.Sensitive = connectAction.Sensitive = midiAction.Sensitive = saveAsAction.Sensitive = closeAction.Sensitive = false; openAction.Sensitive = newAction.Sensitive = true; @@ -826,5 +861,7 @@ namespace DMX2 }; } + + } } \ No newline at end of file diff --git a/DMX-2.0/MidiEventProvider.cs b/DMX-2.0/MidiEventProvider.cs index 4301a2c..b17b684 100644 --- a/DMX-2.0/MidiEventProvider.cs +++ b/DMX-2.0/MidiEventProvider.cs @@ -28,27 +28,27 @@ namespace DMX2 /// /// Etat interne des evenements midi paginés. /// - readonly Dictionary eventlist = new Dictionary (); + readonly Dictionary eventlist = new Dictionary(); /// /// Liste des peripheriques connus (presents ou non) /// - readonly Dictionary knowndevices = new Dictionary (); + readonly Dictionary knowndevices = new Dictionary(); /// /// Liste des ports connectés avec feedback /// - readonly List feedbacksources = new List (); + readonly List feedbacksources = new List(); //static readonly Dictionary srcidToDev = new Dictionary(); - readonly List unpaginatedchannels = new List (); + readonly List unpaginatedchannels = new List(); /// /// Derniere valeur connue pour une evenement sur source donnée : /// Soit recue, soit envoyée (feedback / changement de page) /// - readonly Dictionary lastValueOfSrc = new Dictionary (); - // EventData last; + readonly Dictionary lastValueOfSrc = new Dictionary(); + // EventData last; internalEventDesc levent = null; bool guirefreshflag = false; uint page = 1; @@ -60,68 +60,93 @@ namespace DMX2 uint pageUpCC = 127; uint pageDownCC = 126; - public uint CurrentPage { - get { + AlsaSeqLib.MidiPort midiport; + + public uint CurrentPage + { + get + { return page; } - set { + set + { if (value < 1 || value > maxpage) return; page = value; - Refresh (); + Refresh(); } } - public uint PageUpCC { - get { + public uint PageUpCC + { + get + { return pageUpCC; } - set { + set + { pageUpCC = value; } } - public uint PageDownCC { - get { + public uint PageDownCC + { + get + { return pageDownCC; } - set { + set + { pageDownCC = value; } } - public uint Maxpage { - get { + public uint Maxpage + { + get + { return maxpage; } - set { + set + { maxpage = value; } } - public List UnpaginatedChannels { - get { + public List UnpaginatedChannels + { + get + { return unpaginatedchannels; } } - public bool Use14bCC { - get { + public bool Use14bCC + { + get + { return use14b; } - set { + set + { use14b = value; } } - public int Max14bValue { - get { + public int Max14bValue + { + get + { return max14bValue; } - set { + set + { max14bValue = value; } } - public bool GuiRefreshFlag { - get { - if (guirefreshflag) { + public bool GuiRefreshFlag + { + get + { + if (guirefreshflag) + { guirefreshflag = false; return true; } @@ -129,77 +154,87 @@ namespace DMX2 } } - public void ConnectDevice (string name) + public void ConnectDevice(string name) { - knowndevices.Add (name, new MidiDevice (name)); - AutoConnect (); + knowndevices.Add(name, new MidiControler(name)); + AutoConnect(); } - public void RefreshFeedback (string name) + public void RefreshFeedback(string name) { - foreach (int port in knowndevices[name].ConnectedPorts) { - if (knowndevices [name].HasFeedback) { - if (!feedbacksources.Contains (port)) - feedbacksources.Add (port); - } else { - if (feedbacksources.Contains (port)) - feedbacksources.Remove (port); + foreach (AlsaSeqLib.Port port in knowndevices[name].ConnectedPorts) + { + if (knowndevices[name].HasFeedback) + { + if (!feedbacksources.Contains(port)) + feedbacksources.Add(port); + } + else + { + if (feedbacksources.Contains(port)) + feedbacksources.Remove(port); } } } - public void DisconnectDevice (MidiEventProvider.MidiDevice dev) + public void DisconnectDevice(MidiEventProvider.MidiControler dev) { - if (!knowndevices.ContainsKey (dev.Name)) + if (!knowndevices.ContainsKey(dev.Name)) return; - knowndevices.Remove (dev.Name); + knowndevices.Remove(dev.Name); - foreach (int connectedport in dev.ConnectedPorts) { - int client = connectedport >> 8; - int port = connectedport & 0xFF; - AlsaSeqLib.Deconnecte (client, port); + foreach (AlsaSeqLib.Port connectedport in dev.ConnectedPorts) + { + midiport.Deconnecte(connectedport); } } - public bool IsKnownDevice (string name) + public bool IsKnownDevice(string name) { - return knowndevices.ContainsKey (name); + return knowndevices.ContainsKey(name); } - public IEnumerable KnownDevices { - get { + public IEnumerable KnownDevices + { + get + { return knowndevices.Values; } } - public MidiEventProvider (EventManager manager) + public MidiEventProvider(EventManager manager) { #if DEBUG - MidiDevice dev = new MidiDevice("VMPK Input:VMPK Input"); + MidiControler dev = new MidiControler("VMPK Input:VMPK Input"); dev.HasFeedback = true; - knowndevices.Add(dev.Name,dev); - dev = new MidiDevice("VMPK Output:VMPK Output"); + knowndevices.Add(dev.Name, dev); + dev = new MidiControler("VMPK Output:VMPK Output"); dev.HasFeedback = true; - knowndevices.Add(dev.Name,dev); + knowndevices.Add(dev.Name, dev); #endif - manager.RegisterProvider (this); - AlsaSeqLib.Init (); - - AlsaSeqLib.ConnectFrom (AlsaSeqLib.SND_SEQ_CLIENT_SYSTEM, AlsaSeqLib.SND_SEQ_PORT_SYSTEM_ANNOUNCE); + manager.RegisterProvider(this); + //AlsaSeqLib.Init (); - AutoConnect (); + midiport = new AlsaSeqLib.MidiPort("event_prov_in_out"); + //midiport.ConnectFrom(AlsaSeqLib.SND_SEQ_CLIENT_SYSTEM, AlsaSeqLib.SND_SEQ_PORT_SYSTEM_ANNOUNCE); + AlsaSeqLib.Port systemport = AlsaSeqLib.GetPortByIDs(AlsaSeqLib.SND_SEQ_CLIENT_SYSTEM, AlsaSeqLib.SND_SEQ_PORT_SYSTEM_ANNOUNCE); + midiport.ConnectFrom(systemport); + + AutoConnect(); } - void AutoConnect () + void AutoConnect() { - foreach (var cli in AlsaSeqLib.EnumClients()) { - foreach (var p in cli.Ports) { - PortDetected (cli, p); + foreach (var cli in AlsaSeqLib.EnumClients()) + { + foreach (var p in cli.Ports) + { + PortDetected(cli, p); } } } - void PortDetected (AlsaSeqLib.Client cli, AlsaSeqLib.Port p) + void PortDetected(AlsaSeqLib.Client cli, AlsaSeqLib.Port p) { // Execute a chaque 'apparition' d'un port midi @@ -208,36 +243,44 @@ namespace DMX2 guirefreshflag = true; string fullportname = cli.Name + ':' + p.Name; - if (knowndevices.ContainsKey (fullportname)) { + if (knowndevices.ContainsKey(fullportname)) + { int srcid = p.ClientId << 8 + p.PortId; - if (knowndevices [fullportname].ConnectedPorts.Contains (srcid)) + if (knowndevices[fullportname].ConnectedPorts.Contains(p)) return; - AlsaSeqLib.Connect (p); + midiport.ConnectFrom(p); + midiport.ConnectTo(p); } } - void PortConnect (AlsaSeqLib.snd_seq_connect_t cn, bool connect) + void PortConnect(AlsaSeqLib.snd_seq_connect_t cn, bool connect) { int clientId, portId; - if (cn.dest.client == AlsaSeqLib.ClientId) { + if (cn.dest.client == AlsaSeqLib.ClientId) + { clientId = cn.sender.client; portId = cn.sender.port; - } else { + } + else + { clientId = cn.dest.client; portId = cn.dest.port; } - int srcid = clientId << 8 + portId; - if (connect) { - string fpname = AlsaSeqLib.GetClientByID (clientId).Name + ":" + AlsaSeqLib.GetPortByIDs (clientId, portId).Name; - if (!knowndevices.ContainsKey (fpname)) + AlsaSeqLib.Port p = AlsaSeqLib.GetPortByIDs(clientId, portId); + + if (connect) + { + AlsaSeqLib.Client c = AlsaSeqLib.GetClientByID(clientId); + string fpname = c.Name + ":" + p.Name; + if (!knowndevices.ContainsKey(fpname)) return; - if (knowndevices [fpname].ConnectedPorts.Contains (srcid)) + if (knowndevices[fpname].ConnectedPorts.Contains(p)) return; - knowndevices [fpname].ConnectedPorts.Add (srcid); - if (knowndevices [fpname].HasFeedback) - feedbacksources.Add (srcid); + knowndevices[fpname].ConnectedPorts.Add(p); + if (knowndevices[fpname].HasFeedback) + feedbacksources.Add(p); guirefreshflag = true; //srcidToDev[srcid] = knowndevices [fpname]; @@ -245,11 +288,11 @@ namespace DMX2 return; } - foreach (var dev in knowndevices.Values) { - if (dev.ConnectedPorts.Contains (srcid)) { - /*if(srcidToDev.ContainsKey(srcid)) - srcidToDev.Remove(srcid);*/ - dev.ConnectedPorts.Remove (srcid); + foreach (var dev in knowndevices.Values) + { + if (dev.ConnectedPorts.Contains(p)) + { + dev.ConnectedPorts.Remove(p); guirefreshflag = true; return; } @@ -257,32 +300,36 @@ namespace DMX2 } - static int CombineHash (int hash1, int hash2) + static int CombineHash(int hash1, int hash2) { - unchecked { + unchecked + { return hash1 * 33 + hash2; } } - protected bool HasFeedback (int source) + protected bool HasFeedback(AlsaSeqLib.Port source) { - return feedbacksources.Contains (source); + return feedbacksources.Contains(source); } - public void SendEvent (AlsaSeqLib.snd_seq_event_t ev) + public void SendEvent(AlsaSeqLib.snd_seq_event_t ev) { - AlsaSeqLib.SendEventToSubscribers (ev); + midiport.SendEvent(ev); } - public void Refresh () + public void Refresh() { - foreach (var ievent in eventlist.Values) { - if (ievent.Page == page) { + foreach (var ievent in eventlist.Values) + { + if (ievent.Page == page) + { ievent.SendFeedback(); - foreach (int src in feedbacksources) { - int lnvk = CombineHash (src, ievent.MidiEvCode); + foreach (AlsaSeqLib.Port src in feedbacksources) + { + int lnvk = CombineHash(src.SrcId, ievent.MidiEvCode); if (ievent.LastKnownValue != -1) - lastValueOfSrc [lnvk] = (byte)ievent.LastKnownValue; + lastValueOfSrc[lnvk] = (byte)ievent.LastKnownValue; } } } @@ -292,363 +339,392 @@ namespace DMX2 - bool IEventProvider.Bind (string eventId) + bool IEventProvider.Bind(string eventId) { // On indique a l'EventManager qu'on traite, si l'ID commence par 'MIDI-' - if (! eventId.StartsWith ("MIDI-")) + if (!eventId.StartsWith("MIDI-")) return false; - if (! eventlist.ContainsKey (eventId)) { - Match res = regexEventID.Match (eventId); + if (!eventlist.ContainsKey(eventId)) + { + Match res = regexEventID.Match(eventId); if (!res.Success) return false; - uint _page = uint.Parse (res.Groups ["page"].Value); - int _evHC = res.Groups ["id"].Value.GetHashCode (); + uint _page = uint.Parse(res.Groups["page"].Value); + int _evHC = res.Groups["id"].Value.GetHashCode(); midiFeedbackSender sender = null; - res = regexCtrlEventID.Match (eventId); - if (res.Success) { - byte chan = byte.Parse (res.Groups ["chan"].Value); - uint param = uint.Parse (res.Groups ["param"].Value); - sender = new midiCCFbSender (this, chan, param); - } else if ((res = regexPbEventID.Match (eventId)).Success){ - byte chan = byte.Parse (res.Groups ["chan"].Value); - sender = new midiPBFbSender (this, chan); + res = regexCtrlEventID.Match(eventId); + if (res.Success) + { + byte chan = byte.Parse(res.Groups["chan"].Value); + uint param = uint.Parse(res.Groups["param"].Value); + sender = new midiCCFbSender(this, chan, param); } - eventlist.Add (eventId, new internalEventDesc (eventId, _page, _evHC,sender)); + else if ((res = regexPbEventID.Match(eventId)).Success) + { + byte chan = byte.Parse(res.Groups["chan"].Value); + sender = new midiPBFbSender(this, chan); + } + eventlist.Add(eventId, new internalEventDesc(eventId, _page, _evHC, sender)); } - eventlist [eventId].Bound = true; + eventlist[eventId].Bound = true; return true; } - void IEventProvider.Unbind (string eventId) + void IEventProvider.Unbind(string eventId) { - if (! eventlist.ContainsKey (eventId)) + if (!eventlist.ContainsKey(eventId)) return; - eventlist [eventId].Bound = false; + eventlist[eventId].Bound = false; return; } - Gtk.Menu IEventProvider.GetProviderSubMenu (EventManager.EventMenuData state, Gtk.ButtonPressEventHandler handler) + Gtk.Menu IEventProvider.GetProviderSubMenu(EventManager.EventMenuData state, Gtk.ButtonPressEventHandler handler) { - Gtk.Menu retmenu = new Gtk.Menu (); + Gtk.Menu retmenu = new Gtk.Menu(); - if (levent != null) { // Creation du sous menu "Dernier" - /*Gtk.MenuItem lmenuitem = new Gtk.MenuItem ("Dernier"); - retmenu.Add (lmenuitem); - Gtk.Menu lmenu = new Gtk.Menu (); - lmenuitem.Submenu = lmenu;*/ - Gtk.MenuItem item = new Gtk.MenuItem (GetDescription (levent.InternalName)); - item.Data [EventManager.EventIdKey] = levent.InternalName; - item.Data [EventManager.StateKey] = state; + if (levent != null) + { // Creation du sous menu "Dernier" + /*Gtk.MenuItem lmenuitem = new Gtk.MenuItem ("Dernier"); + retmenu.Add (lmenuitem); + Gtk.Menu lmenu = new Gtk.Menu (); + lmenuitem.Submenu = lmenu;*/ + Gtk.MenuItem item = new Gtk.MenuItem(GetDescription(levent.InternalName)); + item.Data[EventManager.EventIdKey] = levent.InternalName; + item.Data[EventManager.StateKey] = state; item.ButtonPressEvent += handler; - retmenu.Add (item); + retmenu.Add(item); } - Gtk.MenuItem evmenuitem = new Gtk.MenuItem ("Events"); // Creation du sous menu "Events" - retmenu.Add (evmenuitem); - Gtk.Menu evmenu = new Gtk.Menu (); + Gtk.MenuItem evmenuitem = new Gtk.MenuItem("Events"); // Creation du sous menu "Events" + retmenu.Add(evmenuitem); + Gtk.Menu evmenu = new Gtk.Menu(); evmenuitem.Submenu = evmenu; - List sortedKeys = eventlist.Keys.ToList (); // On recupere des IDs - sortedKeys.Sort (); // et on les trie + List sortedKeys = eventlist.Keys.ToList(); // On recupere des IDs + sortedKeys.Sort(); // et on les trie - foreach (string key in sortedKeys) { - internalEventDesc evt = eventlist [key]; - Gtk.MenuItem item = new Gtk.MenuItem (GetDescription (evt.InternalName)); - item.Data [EventManager.EventIdKey] = evt.InternalName; - item.Data [EventManager.StateKey] = state; + foreach (string key in sortedKeys) + { + internalEventDesc evt = eventlist[key]; + Gtk.MenuItem item = new Gtk.MenuItem(GetDescription(evt.InternalName)); + item.Data[EventManager.EventIdKey] = evt.InternalName; + item.Data[EventManager.StateKey] = state; item.ButtonPressEvent += handler; - evmenu.Add (item); + evmenu.Add(item); } return retmenu; } - void IEventProvider.ProcessEvents (EventManagerCallback callback) + void IEventProvider.ProcessEvents(EventManagerCallback callback) { AlsaSeqLib.snd_seq_event_t evS; uint evpage; // Tant qu'il y des evenements midi en attente - while (AlsaSeqLib.GetEvent(out evS)) { - Console.WriteLine(string.Format ("event {0}", evS.type) ); - string id = null; + while (midiport.GetEvent(out evS)) + { + Console.WriteLine(string.Format("event {0}", evS.type)); + string id = null; int value = 0; byte channel = 255; - switch (evS.type) { - case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_SUBSCRIBED: // Connection d'un périph midi - case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_UNSUBSCRIBED: - PortConnect ( - evS.data_connect, - evS.type == AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_SUBSCRIBED - ); - continue; - case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CONTROLLER: - if (evS.data_ev_ctrl.param == pageUpCC && evS.data_ev_ctrl.value > 0) { - CurrentPage++; + switch (evS.type) + { + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_SUBSCRIBED: // Connection d'un périph midi + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_UNSUBSCRIBED: + PortConnect( + evS.data_connect, + evS.type == AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_SUBSCRIBED + ); continue; - } - - if (evS.data_ev_ctrl.param == pageDownCC && evS.data_ev_ctrl.value > 0) { - CurrentPage--; - continue; - } - - channel = evS.data_ev_ctrl.channel; - - if (use14b && evS.data_ev_ctrl.param < 64) { - long msbAddr; - if (evS.data_ev_ctrl.param < 32) { - msbAddr = evS.data_ev_ctrl.channel * 32 + evS.data_ev_ctrl.param; - fbTmpData [msbAddr] = (byte)evS.data_ev_ctrl.value; + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CONTROLLER: + if (evS.data_ev_ctrl.param == pageUpCC && evS.data_ev_ctrl.value > 0) + { + CurrentPage++; continue; } - evS.data_ev_ctrl.param -= 32; - msbAddr = evS.data_ev_ctrl.channel * 32 + evS.data_ev_ctrl.param; - value = ((fbTmpData [msbAddr] << 7) ^ evS.data_ev_ctrl.value); - value = 255 * value / max14bValue; - if (value > 255) value = 255; - } else { - value = 255 * evS.data_ev_ctrl.value / 127; // Conversion {0,127} => {0,255} - } - id = string.Format ("CTRL-C{0}P{1}", evS.data_ev_ctrl.channel, evS.data_ev_ctrl.param); - break; - case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_NOTEON: - id = string.Format ("NOTE-C{0}N{1}", evS.data_ev_note.channel, evS.data_ev_note.note); - channel = evS.data_ev_note.channel; - value = 255; - break; - case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_NOTEOFF: - id = string.Format ("NOTE-C{0}N{1}", evS.data_ev_note.channel, evS.data_ev_note.note); - channel = evS.data_ev_note.channel; - value = 0; - break; - case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PITCHBEND: - id = string.Format ("PB-C{0}", evS.data_ev_ctrl.channel); - channel = evS.data_ev_ctrl.channel; - value = ((evS.data_ev_ctrl.value + 7000) * 255 / 14000); - if (value < 0) - value = 0; - if (value > 255) - value = 255; - break; - 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: - PortDetected ( - AlsaSeqLib.GetClientByID (evS.data_addr.client), - AlsaSeqLib.GetPortByIDs (evS.data_addr.client, evS.data_addr.port) - ); - continue; - /*case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CLOCK: - case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_SENSING: - continue;*/ - - default: - id = null; + if (evS.data_ev_ctrl.param == pageDownCC && evS.data_ev_ctrl.value > 0) + { + CurrentPage--; + continue; + } + + channel = evS.data_ev_ctrl.channel; + + if (use14b && evS.data_ev_ctrl.param < 64) + { + long msbAddr; + if (evS.data_ev_ctrl.param < 32) + { + msbAddr = evS.data_ev_ctrl.channel * 32 + evS.data_ev_ctrl.param; + fbTmpData[msbAddr] = (byte)evS.data_ev_ctrl.value; + continue; + } + evS.data_ev_ctrl.param -= 32; + msbAddr = evS.data_ev_ctrl.channel * 32 + evS.data_ev_ctrl.param; + value = ((fbTmpData[msbAddr] << 7) ^ evS.data_ev_ctrl.value); + value = 255 * value / max14bValue; + if (value > 255) value = 255; + } + else + { + value = 255 * evS.data_ev_ctrl.value / 127; // Conversion {0,127} => {0,255} + } + id = string.Format("CTRL-C{0}P{1}", evS.data_ev_ctrl.channel, evS.data_ev_ctrl.param); + break; + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_NOTEON: + id = string.Format("NOTE-C{0}N{1}", evS.data_ev_note.channel, evS.data_ev_note.note); + channel = evS.data_ev_note.channel; + value = 255; + break; + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_NOTEOFF: + id = string.Format("NOTE-C{0}N{1}", evS.data_ev_note.channel, evS.data_ev_note.note); + channel = evS.data_ev_note.channel; + value = 0; + break; + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PITCHBEND: + id = string.Format("PB-C{0}", evS.data_ev_ctrl.channel); + channel = evS.data_ev_ctrl.channel; + value = ((evS.data_ev_ctrl.value + 7000) * 255 / 14000); + if (value < 0) + value = 0; + if (value > 255) + value = 255; + break; + 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: + PortDetected( + AlsaSeqLib.GetClientByID(evS.data_addr.client), + AlsaSeqLib.GetPortByIDs(evS.data_addr.client,evS.data_addr.port) + ); + continue; + /*case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CLOCK: + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_SENSING: + continue;*/ + + default: + id = null; #if DEBUG - Console.WriteLine(string.Format ("event {0}", evS.type) ); - Info.Publish(string.Format ("event {0}", evS.type) ); // On affiche les evenements inconnus + Console.WriteLine(string.Format("event {0}", evS.type)); + Info.Publish(string.Format("event {0}", evS.type)); // On affiche les evenements inconnus #endif - continue; + continue; } - if (id != null) { + if (id != null) + { // Hashcode de l'ev Midi, non pagine - int evHC = id.GetHashCode (); + int evHC = id.GetHashCode(); int srcid = evS.source.client << 8 + evS.source.port; - int lnvk = CombineHash (srcid, evHC); + int lnvk = CombineHash(srcid, evHC); - if (channel == 255 || unpaginatedchannels.Contains (channel)) + if (channel == 255 || unpaginatedchannels.Contains(channel)) evpage = 0; else evpage = page; // Construction de l'ID evenement - id = string.Format ("MIDI-PAGE{0}-{1}", evpage, id); - + id = string.Format("MIDI-PAGE{0}-{1}", evpage, id); + // Creation de l'objet interne si innexistant - if (!eventlist.ContainsKey (id)) { - switch (evS.type) { + if (!eventlist.ContainsKey(id)) + { + switch (evS.type) + { // TODO : Pitchbend feedback - case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CONTROLLER: - eventlist.Add (id, new internalEventDesc (id, evpage, evHC, - new midiCCFbSender(this,channel,evS.data_ev_ctrl.param)) - ); - break; - case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PITCHBEND: - eventlist.Add (id, new internalEventDesc (id, evpage, evHC, - new midiPBFbSender(this,channel)) - ); - break; - default: - eventlist.Add (id, new internalEventDesc (id, evpage, evHC, null)); - break; + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CONTROLLER: + eventlist.Add(id, new internalEventDesc(id, evpage, evHC, + new midiCCFbSender(this, channel, evS.data_ev_ctrl.param)) + ); + break; + case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PITCHBEND: + eventlist.Add(id, new internalEventDesc(id, evpage, evHC, + new midiPBFbSender(this, channel)) + ); + break; + default: + eventlist.Add(id, new internalEventDesc(id, evpage, evHC, null)); + break; } } - levent = eventlist [id]; //Dernier Evenement recu conserve pour menu + levent = eventlist[id]; //Dernier Evenement recu conserve pour menu - if (!lastValueOfSrc.ContainsKey (lnvk)) { - lastValueOfSrc [lnvk] = (byte)value; - } else if (lastValueOfSrc [lnvk] == (byte)value) + if (!lastValueOfSrc.ContainsKey(lnvk)) + { + lastValueOfSrc[lnvk] = (byte)value; + } + else if (lastValueOfSrc[lnvk] == (byte)value) continue; - EventData evData = new EventData (); + EventData evData = new EventData(); evData.id = id; evData.value = (byte)value; - evData.prev_value = lastValueOfSrc [lnvk]; + evData.prev_value = lastValueOfSrc[lnvk]; /*if (evData.Equals (last)) - continue; */ + continue; */ //last = evData; - eventlist [id].CallEvent (callback, evData); + eventlist[id].CallEvent(callback, evData); /*if (eventlist [id].Bound) { callback (evData); }*/ - lastValueOfSrc [lnvk] = (byte)value; - eventlist [id].LastKnownValue = (byte)value; + lastValueOfSrc[lnvk] = (byte)value; + eventlist[id].LastKnownValue = (byte)value; } } } - string IEventProvider.MenuName { - get { + string IEventProvider.MenuName + { + get + { return "Midi"; } } - static System.Text.RegularExpressions.Regex regexEventID = new System.Text.RegularExpressions.Regex ( + static System.Text.RegularExpressions.Regex regexEventID = new System.Text.RegularExpressions.Regex( @"MIDI-PAGE(?\d+)-(?.+)", System.Text.RegularExpressions.RegexOptions.Compiled); - static System.Text.RegularExpressions.Regex regexCtrlEventID = new System.Text.RegularExpressions.Regex ( + static System.Text.RegularExpressions.Regex regexCtrlEventID = new System.Text.RegularExpressions.Regex( @"MIDI-PAGE(?\d+)-CTRL-C(?\d+)P(?\d+)", System.Text.RegularExpressions.RegexOptions.Compiled); - static System.Text.RegularExpressions.Regex regexPbEventID = new System.Text.RegularExpressions.Regex ( + static System.Text.RegularExpressions.Regex regexPbEventID = new System.Text.RegularExpressions.Regex( @"MIDI-PAGE(?\d+)-PB-C(?\d+)", System.Text.RegularExpressions.RegexOptions.Compiled); - static System.Text.RegularExpressions.Regex regexNoteEventID = new System.Text.RegularExpressions.Regex ( + static System.Text.RegularExpressions.Regex regexNoteEventID = new System.Text.RegularExpressions.Regex( @"MIDI-PAGE(?\d+)-NOTE-C(?\d+)N(?\d+)", System.Text.RegularExpressions.RegexOptions.Compiled); - string GetDescription (string eventId) + string GetDescription(string eventId) { - if (!eventlist.ContainsKey (eventId)) + if (!eventlist.ContainsKey(eventId)) return null; - var res = regexCtrlEventID.Match (eventId); - if (res.Success) { - uint page = uint.Parse (res.Groups ["page"].Value); - byte chan = byte.Parse (res.Groups ["chan"].Value); - uint param = uint.Parse (res.Groups ["param"].Value); - return string.Format ("Page {2} => Control-Change C({0}) Param-{1}", chan + 1, param, page); + var res = regexCtrlEventID.Match(eventId); + if (res.Success) + { + uint page = uint.Parse(res.Groups["page"].Value); + byte chan = byte.Parse(res.Groups["chan"].Value); + uint param = uint.Parse(res.Groups["param"].Value); + return string.Format("Page {2} => Control-Change C({0}) Param-{1}", chan + 1, param, page); } - res = regexPbEventID.Match (eventId); - if (res.Success) { - uint page = uint.Parse (res.Groups ["page"].Value); - byte chan = byte.Parse (res.Groups ["chan"].Value); - return string.Format ("Page {1} => PitchBend C({0})", chan + 1, page); + res = regexPbEventID.Match(eventId); + if (res.Success) + { + uint page = uint.Parse(res.Groups["page"].Value); + byte chan = byte.Parse(res.Groups["chan"].Value); + return string.Format("Page {1} => PitchBend C({0})", chan + 1, page); } - res = regexNoteEventID.Match (eventId); - if (res.Success) { - uint page = uint.Parse (res.Groups ["page"].Value); - byte chan = byte.Parse (res.Groups ["chan"].Value); - byte note = byte.Parse (res.Groups ["note"].Value); - return string.Format ("Page {2} => Note C({0}) Note-{1}", chan + 1, note, page); + res = regexNoteEventID.Match(eventId); + if (res.Success) + { + uint page = uint.Parse(res.Groups["page"].Value); + byte chan = byte.Parse(res.Groups["chan"].Value); + byte note = byte.Parse(res.Groups["note"].Value); + return string.Format("Page {2} => Note C({0}) Note-{1}", chan + 1, note, page); } return eventId; } - IFeedbackInfo IEventProvider.GetFeedbackInfo (string eventId) + IFeedbackInfo IEventProvider.GetFeedbackInfo(string eventId) { - if (!eventlist.ContainsKey (eventId)) + if (!eventlist.ContainsKey(eventId)) return null; - return new midifeedbackinfo (this, eventlist [eventId]); + return new midifeedbackinfo(this, eventlist[eventId]); } - #endregion + #endregion #region IDisposable implementation bool disposed = false; - ~MidiEventProvider () + ~MidiEventProvider() { - Dispose (); + Dispose(); } - public void Dispose () + public void Dispose() { if (disposed) return; disposed = true; - AlsaSeqLib.Close(); + //AlsaSeqLib.Close(); + midiport.Close(); + } #endregion - public void Save (System.Xml.XmlElement parent) + public void Save(System.Xml.XmlElement parent) { - System.Xml.XmlElement el = parent.OwnerDocument.CreateElement ("Midi"); - parent.AppendChild (el); - el.SetAttribute ("maxpage", maxpage.ToString ()); - el.SetAttribute ("pageUpCC", pageUpCC.ToString ()); - el.SetAttribute ("pageDownCC", pageDownCC.ToString ()); - el.SetAttribute ("fourteenbits", use14b?"true":"false"); - el.SetAttribute ("max14b", max14bValue.ToString ()); + System.Xml.XmlElement el = parent.OwnerDocument.CreateElement("Midi"); + parent.AppendChild(el); + el.SetAttribute("maxpage", maxpage.ToString()); + el.SetAttribute("pageUpCC", pageUpCC.ToString()); + el.SetAttribute("pageDownCC", pageDownCC.ToString()); + el.SetAttribute("fourteenbits", use14b ? "true" : "false"); + el.SetAttribute("max14b", max14bValue.ToString()); System.Xml.XmlElement xmlEl; - foreach (MidiDevice dev in knowndevices.Values) { - el.AppendChild (xmlEl = parent.OwnerDocument.CreateElement ("MidiDev")); - xmlEl.SetAttribute ("name", dev.Name); - xmlEl.SetAttribute ("feedback", dev.HasFeedback.ToString ()); + foreach (MidiControler 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 ()); + foreach (byte ch in unpaginatedchannels) + { + el.AppendChild(xmlEl = parent.OwnerDocument.CreateElement("UPC")); + xmlEl.SetAttribute("ch", ch.ToString()); } } - public void Load (System.Xml.XmlElement el) + public void Load(System.Xml.XmlElement el) { if (el == null) return; - maxpage = uint.Parse (el.TryGetAttribute ("maxpage", "8")); - pageUpCC = uint.Parse (el.TryGetAttribute ("pageUpCC", "127")); - pageDownCC = uint.Parse (el.TryGetAttribute ("pageDownCC", "126")); - use14b = el.TryGetAttribute ("fourteenbits", string.Empty).Equals ("true"); - max14bValue = int.Parse (el.TryGetAttribute ("max14b", "255")); + maxpage = uint.Parse(el.TryGetAttribute("maxpage", "8")); + pageUpCC = uint.Parse(el.TryGetAttribute("pageUpCC", "127")); + pageDownCC = uint.Parse(el.TryGetAttribute("pageDownCC", "126")); + use14b = el.TryGetAttribute("fourteenbits", string.Empty).Equals("true"); + max14bValue = int.Parse(el.TryGetAttribute("max14b", "255")); - foreach (var xd in el.GetElementsByTagName("MidiDev")) { + 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 MidiDevice (name)); - knowndevices [name].HasFeedback = bool.Parse (xdev.TryGetAttribute ("feedback", "false")); + string name = xdev.GetAttribute("name"); + if (!knowndevices.ContainsKey(name)) + knowndevices.Add(name, new MidiControler(name)); + knowndevices[name].HasFeedback = bool.Parse(xdev.TryGetAttribute("feedback", "false")); } - unpaginatedchannels.Clear (); - foreach (var xu in el.GetElementsByTagName("UPC")) { + 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"))); + unpaginatedchannels.Add(byte.Parse(xupc.GetAttribute("ch"))); } - AutoConnect (); + AutoConnect(); } - + class internalEventDesc { @@ -659,34 +735,43 @@ namespace DMX2 readonly midiFeedbackSender fbSender; - public bool Bound { - get { + public bool Bound + { + get + { return bound; } - set { + set + { bound = value; } } - public string InternalName { - get { + public string InternalName + { + get + { return internalName; } } - public uint Page { - get { + public uint Page + { + get + { return page; } } - public int MidiEvCode { - get { + public int MidiEvCode + { + get + { return midiEvCode; } } - public internalEventDesc (string _id, uint _page, int _evHCode, midiFeedbackSender _evsender) + public internalEventDesc(string _id, uint _page, int _evHCode, midiFeedbackSender _evsender) { internalName = _id; page = _page; @@ -696,42 +781,48 @@ namespace DMX2 int lastknownvalue = -1; - public int LastKnownValue { - get { + public int LastKnownValue + { + get + { return lastknownvalue; } - set { + set + { lastknownvalue = value; } } - bool nofbflag=false; + bool nofbflag = false; - public void SendFeedback () + public void SendFeedback() { - if(fbSender !=null && !nofbflag) - fbSender.SendFeedback (lastknownvalue); + if (fbSender != null && !nofbflag) + fbSender.SendFeedback(lastknownvalue); } - public void CallEvent (EventManagerCallback callback, EventData evData) + public void CallEvent(EventManagerCallback callback, EventData evData) { nofbflag = true; - callback (evData); + callback(evData); nofbflag = false; } } - abstract class midiFeedbackSender { - public abstract void SendFeedback (int value); + abstract class midiFeedbackSender + { + public abstract void SendFeedback(int value); } - class midiCCFbSender : midiFeedbackSender { + class midiCCFbSender : midiFeedbackSender + { readonly MidiEventProvider prov; AlsaSeqLib.snd_seq_event_t ev; AlsaSeqLib.snd_seq_event_t ev2; - public midiCCFbSender (MidiEventProvider _prov, byte _chan, uint _param){ + public midiCCFbSender(MidiEventProvider _prov, byte _chan, uint _param) + { prov = _prov; ev = new AlsaSeqLib.snd_seq_event_t(); ev.type = AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CONTROLLER; @@ -740,39 +831,44 @@ namespace DMX2 ev2 = ev; ev2.data_ev_ctrl.param += 32; } - public override void SendFeedback (int value) + public override void SendFeedback(int value) { - if (prov.use14b && ev.data_ev_ctrl.param <32 ) { + if (prov.use14b && ev.data_ev_ctrl.param < 32) + { value = value * prov.max14bValue / 255; ev.data_ev_ctrl.value = value >> 7; ev2.data_ev_ctrl.value = value & 0xFF; - prov.SendEvent (ev); - prov.SendEvent (ev2); - } else { + prov.SendEvent(ev); + prov.SendEvent(ev2); + } + else + { ev.data_ev_ctrl.value = value * 127 / 255; - prov.SendEvent (ev); + prov.SendEvent(ev); } } } - class midiPBFbSender : midiFeedbackSender { + class midiPBFbSender : midiFeedbackSender + { readonly MidiEventProvider prov; AlsaSeqLib.snd_seq_event_t ev; - public midiPBFbSender (MidiEventProvider _prov, byte _chan){ + public midiPBFbSender(MidiEventProvider _prov, byte _chan) + { prov = _prov; ev = new AlsaSeqLib.snd_seq_event_t(); ev.type = AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PITCHBEND; ev.data_ev_ctrl.channel = _chan; } - public override void SendFeedback (int value) + public override void SendFeedback(int value) { // value = ((evS.data_ev_ctrl.value + 7000) * 255 / 14000); ev.data_ev_ctrl.value = value * 14000 / 255 - 7000; - prov.SendEvent (ev); + prov.SendEvent(ev); } } @@ -781,24 +877,26 @@ namespace DMX2 MidiEventProvider prov; readonly internalEventDesc iev; - public midifeedbackinfo (MidiEventProvider _prov, internalEventDesc _iev) + public midifeedbackinfo(MidiEventProvider _prov, internalEventDesc _iev) { prov = _prov; iev = _iev; } #region IFeedbackInfo implementation - bool IFeedbackInfo.FeedBack (byte data) + bool IFeedbackInfo.FeedBack(byte data) { iev.LastKnownValue = data; - if (prov.CurrentPage == iev.Page || iev.Page == 0) { + if (prov.CurrentPage == iev.Page || iev.Page == 0) + { iev.SendFeedback(); - foreach (int src in prov.feedbacksources) { - int lnvk = CombineHash (src, iev.MidiEvCode); + foreach (AlsaSeqLib.Port src in prov.feedbacksources) + { + int lnvk = CombineHash(src.SrcId, iev.MidiEvCode); if (iev.LastKnownValue != -1) - prov.lastValueOfSrc [lnvk] = (byte)iev.LastKnownValue; + prov.lastValueOfSrc[lnvk] = (byte)iev.LastKnownValue; } } @@ -807,7 +905,7 @@ namespace DMX2 #endregion } - public class MidiDevice + public class MidiControler { string name; @@ -815,13 +913,14 @@ namespace DMX2 public bool HasFeedback { get; set; } - readonly List connected = new List (); + readonly List connected = new List(); - public List ConnectedPorts { - get{ return connected;} + public List ConnectedPorts + { + get { return connected; } } - public MidiDevice (string _name) + public MidiControler(string _name) { name = _name; } diff --git a/DMX-2.0/OSCMessage.cs b/DMX-2.0/OSCMessage.cs new file mode 100644 index 0000000..982581f --- /dev/null +++ b/DMX-2.0/OSCMessage.cs @@ -0,0 +1,323 @@ +using System; +namespace DMX2 +{ + public class OSCMessage + { + + public enum OSCType + { + Int32, + Float32, + String, + Blob + } + + + public abstract class OSCArg + { + protected OSCArg() { } + public abstract OSCType Type { get; } + public virtual string GetString() { throw new System.NotImplementedException(); } + public virtual float GetFloat() { throw new System.NotImplementedException(); } + public virtual int GetInt() { throw new System.NotImplementedException(); } + public virtual byte[] GetBlob() { throw new System.NotImplementedException(); } + } + + private class OSCStringArg : OSCArg + { + string _s; + public override OSCType Type + { + get + { + return OSCType.String; + } + } + public OSCStringArg(string s) + { + _s = s; + } + public override string GetString() + { + return _s; + } + public override float GetFloat() + { + float f; + if (float.TryParse(_s, out f)) return f; + return 0.0f; + } + public override int GetInt() + { + return (int)GetFloat(); + } + } + private class OSCIntArg : OSCArg + { + int _i; + public override OSCType Type + { + get + { + return OSCType.Int32; + } + } + public OSCIntArg(int i) + { + _i = i; + } + public override int GetInt() + { + return _i; + } + public override float GetFloat() + { + return (float)_i; + } + public override string GetString() + { + return _i.ToString(); + } + + } + private class OSCFloatArg : OSCArg + { + float _f; + public override OSCType Type + { + get + { + return OSCType.Float32; + } + } + public OSCFloatArg(float f) + { + _f = f; + } + public override int GetInt() + { + return (int)(_f); + } + public override float GetFloat() + { + return _f; + } + public override string GetString() + { + return _f.ToString(); + } + + } + private class OSCBlobArg : OSCArg + { + byte[] _b; + public override OSCType Type + { + get + { + return OSCType.Blob; + } + } + public OSCBlobArg(byte[] b) + { + _b = b; + } + public override byte[] GetBlob() + { + return _b; + } + + } + + static string DecodeString(byte[] b, ref int pos) + { + int end = Array.IndexOf(b, 0, pos); + if (end == -1) end = b.Length; + string ret = System.Text.Encoding.ASCII.GetString(b, pos, end - pos); + pos = (end / 4 + 1) * 4; + return ret; + } + + static float DecodeFloat(byte[] b, ref int pos) + { + if (BitConverter.IsLittleEndian) + Array.Reverse(b, pos, 4); + float ret = BitConverter.ToSingle(b, pos); + pos += 4; + return ret; + } + + static int DecodeInt(byte[] b, ref int pos) + { + if (BitConverter.IsLittleEndian) + Array.Reverse(b, pos, 4); + int ret = BitConverter.ToInt32(b, pos); + pos += 4; + return ret; + } + + public OSCMessage(byte[] bmsg) + { + int pos = 0; + Address = DecodeString(bmsg, ref pos); + string typestring = DecodeString(bmsg, ref pos); + + args = new OSCArg[typestring.Length - 1]; + + int idx = 0; + foreach (char c in typestring) + { + switch (c) + { + case 'f': + args[idx++] = new OSCFloatArg(DecodeFloat(bmsg, ref pos)); + break; + case 's': + args[idx++] = new OSCStringArg(DecodeString(bmsg, ref pos)); + break; + case 'i': + args[idx++] = new OSCIntArg(DecodeInt(bmsg, ref pos)); + break; + case 'b': + int len = DecodeInt(bmsg, ref pos) * 4; + byte[] b = new byte[len]; + bmsg.CopyTo(b, 0); + pos += len; + args[idx++] = new OSCBlobArg(b); + break; + + } + } + + } + + + public string Address + { + get; + private set; + } + + OSCArg[] args; + + public OSCArg[] Args + { + get + { + return args; + } + } + + + // Construction de message + public OSCMessage(string _address) + { + Address = _address; + } + + void AddArg(OSCArg arg) + { + if (args == null) + { + args = new OSCArg[1]; + } + else + { + OSCArg[] na = new OSCArg[args.Length + 1]; + args.CopyTo(na, 0); + args = na; + } + args[args.Length - 1] = arg; + } + + public void AddString(string arg) + { + AddArg(new OSCStringArg(arg)); + } + + public void AddInt(int arg) + { + AddArg(new OSCIntArg(arg)); + } + public void AddFloat(float arg) + { + AddArg(new OSCFloatArg(arg)); + } + + public byte[] Encode() + { + int len = System.Text.ASCIIEncoding.ASCII.GetByteCount(Address) / 4 + 1; + string typestring = ","; + foreach (var arg in args) + { + switch (arg.Type) + { + case OSCType.Int32: + len += 1; + typestring += "i"; + break; + case OSCType.Float32: + len += 1; + typestring += "f"; + break; + case OSCType.String: + len += System.Text.ASCIIEncoding.ASCII.GetByteCount(arg.GetString()) / 4 + 1; + typestring += "s"; + break; + } + } + + len += typestring.Length / 4 + 1; + byte[] res = new byte[len * 4]; + int pos = 0; + EncodeString(res, ref pos, Address); + EncodeString(res, ref pos, typestring); + foreach (var arg in args) + { + switch (arg.Type) + { + case OSCType.Int32: + EncodeInt(res, ref pos, arg.GetInt()); + break; + case OSCType.Float32: + EncodeFloat(res, ref pos, arg.GetFloat()); + break; + case OSCType.String: + EncodeString(res, ref pos, arg.GetString()); + break; + } + } + return res; + } + + void EncodeString(byte[] buff, ref int pos, string s) + { + pos += + System.Text.ASCIIEncoding.ASCII.GetBytes( + s, 0, s.Length, buff, pos); + do + { + buff[pos++] = 0; + } while (pos % 4 != 0); + } + + void EncodeInt(byte[] res, ref int pos, int i) + { + byte[] buff = BitConverter.GetBytes(i); + if (BitConverter.IsLittleEndian) + Array.Reverse(buff); + buff.CopyTo(res, pos); + pos += 4; + } + + void EncodeFloat(byte[] res, ref int pos, float f) + { + byte[] buff = BitConverter.GetBytes(f); + if (BitConverter.IsLittleEndian) + Array.Reverse(buff); + buff.CopyTo(res, pos); + pos += 4; + } + } + +} diff --git a/DMX-2.0/OSCServer.cs b/DMX-2.0/OSCServer.cs index 83f8400..691390e 100644 --- a/DMX-2.0/OSCServer.cs +++ b/DMX-2.0/OSCServer.cs @@ -13,294 +13,7 @@ namespace DMX2 Thread pollThread = null; bool running=true; - - enum OSCType { - Int32, - Float32, - String, - Blob - } - - class OSCMessage { - - public abstract class OSCArg{ - protected OSCArg(){} - public abstract OSCType Type{ get; } - public virtual string GetString(){ throw new System.NotImplementedException (); } - public virtual float GetFloat (){throw new System.NotImplementedException (); } - public virtual int GetInt(){throw new System.NotImplementedException (); } - public virtual byte[] GetBlob(){throw new System.NotImplementedException (); } - } - - private class OSCStringArg : OSCArg{ - string _s; - public override OSCType Type { - get { - return OSCType.String; - } - } - public OSCStringArg(string s){ - _s=s; - } - public override string GetString () - { - return _s; - } - public override float GetFloat () - { - float f; - if(float.TryParse(_s,out f)) return f; - return 0.0f; - } - public override int GetInt () - { - return (int)GetFloat(); - } - } - private class OSCIntArg : OSCArg{ - int _i; - public override OSCType Type { - get { - return OSCType.Int32; - } - } - public OSCIntArg(int i){ - _i=i; - } - public override int GetInt () - { - return _i; - } - public override float GetFloat () - { - return (float)_i; - } - public override string GetString () - { - return _i.ToString(); - } - - } - private class OSCFloatArg : OSCArg{ - float _f; - public override OSCType Type { - get { - return OSCType.Float32; - } - } - public OSCFloatArg(float f){ - _f=f; - } - public override int GetInt () - { - return (int)(_f); - } - public override float GetFloat () - { - return _f; - } - public override string GetString () - { - return _f.ToString(); - } - - } - private class OSCBlobArg : OSCArg{ - byte[] _b; - public override OSCType Type { - get { - return OSCType.Blob; - } - } - public OSCBlobArg(byte[] b){ - _b=b; - } - public override byte[] GetBlob () - { - return _b; - } - - } - - static string DecodeString (byte[] b, ref int pos) - { - int end = Array.IndexOf(b,0,pos); - if(end==-1) end = b.Length; - string ret = System.Text.Encoding.ASCII.GetString(b,pos,end-pos); - pos = (end/4+1)*4; - return ret; - } - - static float DecodeFloat (byte[] b, ref int pos) - { - if(BitConverter.IsLittleEndian) - Array.Reverse(b,pos,4); - float ret = BitConverter.ToSingle(b,pos); - pos+=4; - return ret; - } - - static int DecodeInt (byte[] b, ref int pos) - { - if(BitConverter.IsLittleEndian) - Array.Reverse(b,pos,4); - int ret = BitConverter.ToInt32(b, pos); - pos+=4; - return ret; - } - - public OSCMessage(byte[] bmsg){ - int pos = 0; - Address = DecodeString(bmsg,ref pos); - string typestring = DecodeString(bmsg,ref pos); - - args = new OSCArg[typestring.Length-1]; - - int idx=0; - foreach(char c in typestring){ - switch(c){ - case 'f': - args[idx++] = new OSCFloatArg(DecodeFloat(bmsg,ref pos)); - break; - case 's': - args[idx++] = new OSCStringArg(DecodeString(bmsg,ref pos)); - break; - case 'i': - args[idx++] = new OSCIntArg(DecodeInt(bmsg,ref pos)); - break; - case 'b': - int len=DecodeInt(bmsg,ref pos)*4; - byte[] b = new byte[len]; - bmsg.CopyTo(b,0); - pos+=len; - args[idx++] = new OSCBlobArg(b); - break; - - } - } - - } - - - public string Address{ - get; - private set; - } - - OSCArg[] args; - - public OSCArg[] Args { - get { - return args; - } - } - - - // Construction de message - public OSCMessage(string _address){ - Address=_address; - } - - void AddArg (OSCArg arg) - { - if (args == null) { - args = new OSCArg[1]; - } else { - OSCArg[] na = new OSCArg[args.Length+1]; - args.CopyTo(na,0); - args = na; - } - args[args.Length-1] = arg; - } - - public void AddString (string arg) - { - AddArg(new OSCStringArg(arg)); - } - - public void AddInt (int arg) - { - AddArg(new OSCIntArg(arg)); - } - public void AddFloat (float arg) - { - AddArg(new OSCFloatArg(arg)); - } - - public byte[] Encode () - { - int len = System.Text.ASCIIEncoding.ASCII.GetByteCount (Address) / 4+1; - string typestring = ","; - foreach (var arg in args) { - switch(arg.Type){ - case OSCType.Int32: - len +=1; - typestring+="i"; - break; - case OSCType.Float32: - len += 1; - typestring+="f"; - break; - case OSCType.String: - len += System.Text.ASCIIEncoding.ASCII.GetByteCount (arg.GetString())/4+1; - typestring+="s"; - break; - } - } - - len += typestring.Length/4 +1; - byte[] res = new byte[len*4]; - int pos=0; - EncodeString(res,ref pos,Address); - EncodeString(res,ref pos,typestring); - foreach (var arg in args) { - switch(arg.Type){ - case OSCType.Int32: - EncodeInt(res,ref pos,arg.GetInt()); - break; - case OSCType.Float32: - EncodeFloat(res,ref pos,arg.GetFloat()); - break; - case OSCType.String: - EncodeString(res,ref pos,arg.GetString()); - break; - } - } - return res; - } - - void EncodeString (byte[] buff, ref int pos, string s) - { - pos += - System.Text.ASCIIEncoding.ASCII.GetBytes ( - s, 0, s.Length, buff, pos); - do { - buff[pos++]=0; - } while (pos%4!=0); - } - - void EncodeInt (byte[] res, ref int pos, int i) - { - byte[] buff = BitConverter.GetBytes(i); - if(BitConverter.IsLittleEndian) - Array.Reverse(buff); - buff.CopyTo(res,pos); - pos+=4; - } - - void EncodeFloat (byte[] res, ref int pos, float f) - { - byte[] buff = BitConverter.GetBytes(f); - if(BitConverter.IsLittleEndian) - Array.Reverse(buff); - buff.CopyTo(res,pos); - pos+=4; - } - } - - - - public OSCServer () + public OSCServer () { pollThread = new Thread(new ThreadStart(Loop)); pollThread.Start(); diff --git a/DMX-2.0/SeqMidiUI.cs b/DMX-2.0/SeqMidiUI.cs new file mode 100644 index 0000000..da8c0d6 --- /dev/null +++ b/DMX-2.0/SeqMidiUI.cs @@ -0,0 +1,367 @@ +/* + + 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 . +*/ + +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 */ + + ListStore lsDest = null; + + 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 */ + { + + cmdList.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)); + cmdList.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; + cmdList.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; + cmdList.AppendColumn (topCol); + + var cmdCol = new Gtk.TreeViewColumn (); + var cmdCell = new Gtk.CellRendererText (); + cmdCol.Title = "Commande Midi"; + cmdCol.PackStart (cmdCell, true); + cmdCol.SetCellDataFunc (cmdCell, new TreeCellDataFunc (RenderMatriceCmd)); + cmdCell.Editable = true; + cmdCell.Edited += OnCmdCellEdited; + cmdList.AppendColumn (cmdCol); + + lsEffets = new Gtk.ListStore(typeof (SequenceurMidi.Ligne)); + this.cmdList.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; + SequenceurMidi.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMidi.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; + SequenceurMidi.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMidi.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 RenderMatriceCmd (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter) + { + if (Conduite.Courante==null) return; + SequenceurMidi.Ligne l = tree_model.GetValue (iter, 0) as SequenceurMidi.Ligne; + (cell as Gtk.CellRendererText).Text = l.Commande; + } + + void OnNomCellEdited (object o, EditedArgs args) + { + Gtk.TreeIter iter; + lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path)); + SequenceurMidi.Ligne l = lsEffets.GetValue(iter,0) as SequenceurMidi.Ligne; + l.Nom = args.NewText; + } + + void OnTopCellEdited (object o, EditedArgs args) + { + Gtk.TreeIter iter; + lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path)); + SequenceurMidi.Ligne l = lsEffets.GetValue (iter, 0) as SequenceurMidi.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 OnCmdCellEdited (object o, EditedArgs args) + { + Gtk.TreeIter iter; + lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path)); + SequenceurMidi.Ligne l = lsEffets.GetValue(iter,0) as SequenceurMidi.Ligne; + l.Commande = args.NewText; + } + + void UpdListeEffets () + { + lsEffets.Clear(); + foreach (var ligne in sequenceur.Lignes) { + lsEffets.AppendValues(ligne); + } + } + + void HandleCellLayoutDataFunc(CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter) + { + var s = (tree_model.GetValue(iter, 0) as string); + (cell as Gtk.CellRendererText).Text = "<<-- " + s + " -->>"; + } + + +#endregion + + public SeqMidiUI (SequenceurMidi s ) : base (s) + { + this.Build (); + titreLabel.Text = s.Name; + sequenceur = s; + ConstruitMatrice (); + + + + new ContextMenuHelper(frame1,RenamePopup); + new ContextMenuHelper(evBBox,CompteurPopup); + + /*lsDest = new ListStore(typeof(string)); + lsDest.AppendValues("TEST 1"); + lsDest.AppendValues("TEST 2"); + + cbDest.Model = lsDest; + + cbDest.SetCellDataFunc(cbDest.Cells[0], HandleCellLayoutDataFunc);*/ + + + } + + + + 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); + } + ); + + + item = new Gtk.SeparatorMenuItem (); + m.Add(item); + + m.ShowAll(); + m.Popup(); + + } + + + static public object PortKey = new object(); + + 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(); + cmdList.QueueDraw(); + SelectionneEffet (sequenceur.IndexLigneEnCours); + posLabel.Text = string.Format("n°{0}",sequenceur.IndexLigneEnCours +1 ); + } + + if (DateTime.Now > nextMaj ) { + nextMaj = DateTime.Now.AddMilliseconds(500); + StringBuilder str = new StringBuilder (); + actLabel.LabelProp = str.ToString (); + } + } + + + + void SelectionneEffet (int index) + { + if(index <0 ) return; + cmdList.SetCursor( new TreePath( new int[1] {index }) ,null,false); + effetChange = false; + } + + 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 = cmdList.Selection.GetSelectedRows(); + if(sel.Length ==0) return -1; + return cmdList.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 OnBtnAjoutLigneActivated (object sender, EventArgs e) + { + int pos=IndexEffetSelectionne() + 1; + sequenceur.AjoutLigne(pos); + UpdListeEffets(); + cmdList.SetCursor( new TreePath( new int[1] {pos }) , cmdList.Columns[1] ,true); + } + + protected void OnRemoveLigneActivated (object sender, EventArgs e) + { + int pos = IndexEffetSelectionne(); + if (pos==-1) return; + sequenceur.RetireLigne(pos); + UpdListeEffets(); + } + + protected void OnCmdListeCursorChanged (object sender, EventArgs e) + { + if(effetChange) return; + TreeViewColumn col; + TreePath path; + cmdList.GetCursor (out path, out col); + + if (cmdList.Columns [0] == col) { + sequenceur.IndexLigneaSuivre = IndexEffetSelectionne(); + } + } + + + + + + protected void OnHbox2SizeAllocated (object o, SizeAllocatedArgs args) + { + actLabel.SetSizeRequest ( Math.Max(50, args.Allocation.Width - posLabel.Allocation.Width - timeLabel.Allocation.Width - 50),-1); + } + + + } +} + diff --git a/DMX-2.0/SeqOscUI.cs b/DMX-2.0/SeqOscUI.cs new file mode 100644 index 0000000..e1d8f9d --- /dev/null +++ b/DMX-2.0/SeqOscUI.cs @@ -0,0 +1,346 @@ +/* + + 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 . +*/ + +using System; +using System.Collections.Generic; +using Gtk; +using System.Text; + +namespace DMX2 +{ + [System.ComponentModel.ToolboxItem(true)] + public partial class SeqOscUI : SequenceurUI + { + bool fullUpdFlag = true; + bool updating; + SequenceurOSC 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 */ + { + + cmdList.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)); + cmdList.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; + cmdList.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; + cmdList.AppendColumn (topCol); + + var cmdCol = new Gtk.TreeViewColumn (); + var cmdCell = new Gtk.CellRendererText (); + cmdCol.Title = "Commande OSC"; + cmdCol.PackStart (cmdCell, true); + cmdCol.SetCellDataFunc (cmdCell, new TreeCellDataFunc (RenderMatriceCmd)); + cmdCell.Editable = true; + cmdCell.Edited += OnCmdCellEdited; + cmdList.AppendColumn (cmdCol); + + lsEffets = new Gtk.ListStore(typeof (SequenceurOSC.Ligne)); + this.cmdList.Model = lsEffets; + UpdListeEffets(); + } + + void RenderMatriceNum (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter) + { + if (Conduite.Courante==null) return; + string num=string.Empty; + SequenceurOSC.Ligne l = tree_model.GetValue (iter, 0) as SequenceurOSC.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; + SequenceurOSC.Ligne l = tree_model.GetValue (iter, 0) as SequenceurOSC.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; + SequenceurOSC.Ligne l = tree_model.GetValue (iter, 0) as SequenceurOSC.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 RenderMatriceCmd (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter) + { + if (Conduite.Courante==null) return; + SequenceurOSC.Ligne l = tree_model.GetValue (iter, 0) as SequenceurOSC.Ligne; + (cell as Gtk.CellRendererText).Text = l.Commande; + } + + void OnNomCellEdited (object o, EditedArgs args) + { + Gtk.TreeIter iter; + lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path)); + SequenceurOSC.Ligne l = lsEffets.GetValue(iter,0) as SequenceurOSC.Ligne; + l.Nom = args.NewText; + } + + void OnTopCellEdited (object o, EditedArgs args) + { + Gtk.TreeIter iter; + lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path)); + SequenceurOSC.Ligne l = lsEffets.GetValue (iter, 0) as SequenceurOSC.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 OnCmdCellEdited (object o, EditedArgs args) + { + Gtk.TreeIter iter; + lsEffets.GetIter (out iter, new Gtk.TreePath (args.Path)); + SequenceurOSC.Ligne l = lsEffets.GetValue(iter,0) as SequenceurOSC.Ligne; + l.Commande = args.NewText; + } + + void UpdListeEffets () + { + lsEffets.Clear(); + foreach (var ligne in sequenceur.Lignes) { + lsEffets.AppendValues(ligne); + } + } + +#endregion + + public SeqOscUI (SequenceurOSC s ) : base (s) + { + this.Build (); + titreLabel.Text = s.Name; + sequenceur = s; + ConstruitMatrice (); + + + new ContextMenuHelper(frame1,RenamePopup); + new ContextMenuHelper(evBBox,CompteurPopup); + + + } + + + + 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(); + cmdList.QueueDraw(); + SelectionneEffet (sequenceur.IndexLigneEnCours); + posLabel.Text = string.Format("n°{0}",sequenceur.IndexLigneEnCours +1 ); + } + + if (DateTime.Now > nextMaj ) { + nextMaj = DateTime.Now.AddMilliseconds(500); + StringBuilder str = new StringBuilder (); + actLabel.LabelProp = str.ToString (); + } + } + + + void SelectionneEffet (int index) + { + if(index <0 ) return; + cmdList.SetCursor( new TreePath( new int[1] {index }) ,null,false); + effetChange = false; + } + + protected void OnCloseActionActivated (object sender, EventArgs e) + { + this.Destroy(); + } + + protected void FullUpdate () + { + fullUpdFlag = true; + + posLabel.Text = string.Format("n°{0}",sequenceur.IndexLigneEnCours +1); + + entryDest.Text = sequenceur.Destination; + + fullUpdFlag=false; + } + + int IndexEffetSelectionne() + { + var sel = cmdList.Selection.GetSelectedRows(); + if(sel.Length ==0) return -1; + return cmdList.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 OnBtnAjoutLigneActivated (object sender, EventArgs e) + { + int pos=IndexEffetSelectionne() + 1; + sequenceur.AjoutLigne(pos); + UpdListeEffets(); + cmdList.SetCursor( new TreePath( new int[1] {pos }) , cmdList.Columns[1] ,true); + } + + protected void OnRemoveLigneActivated (object sender, EventArgs e) + { + int pos = IndexEffetSelectionne(); + if (pos==-1) return; + sequenceur.RetireLigne(pos); + UpdListeEffets(); + } + + protected void OnCmdListeCursorChanged (object sender, EventArgs e) + { + if(effetChange) return; + TreeViewColumn col; + TreePath path; + cmdList.GetCursor (out path, out col); + + if (cmdList.Columns [0] == col) { + sequenceur.IndexLigneaSuivre = IndexEffetSelectionne(); + } + } + + + + + + protected void OnHbox2SizeAllocated (object o, SizeAllocatedArgs args) + { + actLabel.SetSizeRequest ( Math.Max(50, args.Allocation.Width - posLabel.Allocation.Width - timeLabel.Allocation.Width - 50),-1); + } + + protected void OnEntryDestChanged(object sender, EventArgs e) + { + sequenceur.Destination = entryDest.Text; + } + } +} + diff --git a/DMX-2.0/Sequenceur.cs b/DMX-2.0/Sequenceur.cs index b2d62b1..7e5ac68 100644 --- a/DMX-2.0/Sequenceur.cs +++ b/DMX-2.0/Sequenceur.cs @@ -84,6 +84,10 @@ namespace DMX2 return SequenceurMacro.Load(conduite,el); case "SequenceurSon": return SequenceurSon.Load(conduite,el); + case "SequenceurMidi": + return SequenceurMidi.Load(conduite,el); + case "SequenceurOSC": + return SequenceurOSC.Load(conduite,el); } return null; } diff --git a/DMX-2.0/SequenceurMacro.cs b/DMX-2.0/SequenceurMacro.cs index 9e29526..4b13ff2 100644 --- a/DMX-2.0/SequenceurMacro.cs +++ b/DMX-2.0/SequenceurMacro.cs @@ -356,10 +356,8 @@ namespace DMX2 } } - if (topPresent) { - if (timeStamp > topSuivant) { + while (topPresent && (timeStamp >= topSuivant)) { LigneSuivante (); - } } } finally { Monitor.Exit (this); diff --git a/DMX-2.0/SequenceurMidi.cs b/DMX-2.0/SequenceurMidi.cs new file mode 100644 index 0000000..227b187 --- /dev/null +++ b/DMX-2.0/SequenceurMidi.cs @@ -0,0 +1,602 @@ +/* + + 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 . +*/ + +using System; +using System.Collections.Generic; +using System.Xml; +using System.Collections.ObjectModel; +using System.Threading; + +namespace DMX2 +{ + public class SequenceurMidi : Sequenceur , IDisposable + { + public class Ligne { + public Ligne(){} + string nom = string.Empty; + TimeSpan top = TimeSpan.MinValue; + + string commande =string.Empty; + + public string Nom { + get { + return nom; + } + set { + nom = value; + } + } + + public TimeSpan Top { + get { + return top; + } + set { + top = value; + } + } + + public string Commande { + get { + return commande; + } + set{ + commande = 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 ("cmd", commande); + + } + + 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.commande = el.GetAttribute ("cmd"); + + return l; + } + } + + + + List lignes = new List(); + + Ligne aSuivre = null; + Ligne enCours = null; + Ligne ligneMaitre = null; + + TimeSpan timeStamp = TimeSpan.Zero; + TimeSpan topSuivant = TimeSpan.Zero; + bool topPresent = false; + + actionEventTarget goNextEventTarget=null; + actionEventTarget goBackEventTarget=null; + + + SeqMidiUI ui = null; + bool change = false; + + bool paused=false; + + + AlsaSeqLib.MidiPort midiport; + static int portnum=0; + + public class DestListItem { + public DestListItem(string _name, AlsaSeqLib.Port _port){ + name = _name; + port = _port; + } + string name; + public string Name{ + get { return name; } + } + AlsaSeqLib.Port port; + public AlsaSeqLib.Port Port{ + get { return port; } + } + } + + DestListItem destination; + public DestListItem Destination + { + get{ + return destination; + } + set{ + destination = value; + + } + } + + public bool Paused { + get { + return paused; + } + set { + paused = value; + } + } + + int midiCh=0; + + public int MidiCh { + get{ + return midiCh; + } + } + + public SequenceurMidi () + { + + 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; + } + ); + string portname = string.Format ("midi_seq_{0}", portnum++); + midiport = new AlsaSeqLib.MidiPort (portname); + } + + bool disposed=false; + ~SequenceurMidi () + { + ((IDisposable)this).Dispose (); + } + + void IDisposable.Dispose (){ + if (disposed) + return; + disposed = true; + midiport.Close (); + } + + 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 Lignes { + get { + return lignes.AsReadOnly(); + } + } + + public override int ValeurCircuit (Circuit c) + { + return 0; + } + + public override void Tick (TimeSpan time) + { + if (paused) + return; + timeStamp += time; + + if (Monitor.TryEnter (this)) { + try { + while (topPresent &&(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.Commande.ToLower ().Equals ("r") && ligneMaitre != null) { + enCours = ligneMaitre; + } + + System.Text.RegularExpressions.Match m = regexGotoCmd.Match (enCours.Commande); + if (m.Success) { + int gtindex = int.Parse (m.Groups [2].Value)-1; + if (lignes.Count >= gtindex) { + timeStamp = TimeSpan.Zero; + enCours = lignes [gtindex]; + } + } + + + if(enCours.Nom.Length!=0) + { + ligneMaitre = enCours; + timeStamp = TimeSpan.Zero; + } + } + else + { + enCours = aSuivre; + ligneMaitre = enCours; + timeStamp = TimeSpan.Zero; + + } + index = IndexLigneEnCours+1; + if(index= TimeSpan.Zero) + { + topPresent = true; + topSuivant= lignes[index].Top; + } + } + aSuivre = null; + LanceCommandeMidi(); + if(ui!=null) + ui.EffetChange(); + } + } + + static System.Text.RegularExpressions.Regex regexMidiCmd = new System.Text.RegularExpressions.Regex( + @"(ch(\d+))|(CC(\d+),(\d+))|(PC(\d+))|(N(\d+)(\+|\-)(\d+)?)", + System.Text.RegularExpressions.RegexOptions.Compiled | System.Text.RegularExpressions.RegexOptions.IgnoreCase ); + + static System.Text.RegularExpressions.Regex regexGotoCmd = new System.Text.RegularExpressions.Regex( + @"(GT(\d+))", + System.Text.RegularExpressions.RegexOptions.Compiled | System.Text.RegularExpressions.RegexOptions.IgnoreCase ); + + + void LanceCommandeMidi () + { + + Console.WriteLine (enCours.Commande); + + + AlsaSeqLib.snd_seq_event_t ev; + var matches = regexMidiCmd.Matches (enCours.Commande); + + foreach (System.Text.RegularExpressions.Match match in matches) { + if (match.Groups [2].Success) { + midiCh = int.Parse (match.Groups [2].Value); + continue; + } + if (match.Groups [4].Success) { + ev = new AlsaSeqLib.snd_seq_event_t (); + ev.type = AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CONTROLLER; + ev.data_ev_ctrl.channel = (byte)midiCh; + ev.data_ev_ctrl.param = uint.Parse (match.Groups [4].Value); + ev.data_ev_ctrl.value = int.Parse (match.Groups [5].Value); + midiport.SendEvent (ev); + } + + if (match.Groups [7].Success) { + ev = new AlsaSeqLib.snd_seq_event_t (); + ev.type = AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PGMCHANGE; + ev.data_ev_ctrl.channel = (byte)midiCh; + ev.data_ev_ctrl.value = int.Parse (match.Groups [7].Value); + midiport.SendEvent (ev); + } + + if (match.Groups [9].Success) { + ev = new AlsaSeqLib.snd_seq_event_t (); + ev.data_ev_note.note = byte.Parse (match.Groups [9].Value); + ev.data_ev_note.channel = (byte)midiCh; + + if (match.Groups [10].Value.Equals ("+")) { + ev.type = AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_NOTEON; + if (match.Groups [11].Success) + ev.data_ev_note.velocity = byte.Parse (match.Groups [11].Value); + else + ev.data_ev_note.velocity = 127; + } else { + ev.type = AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_NOTEOFF; + if (match.Groups [11].Success) + ev.data_ev_note.off_velocity = byte.Parse (match.Groups [11].Value); + else + ev.data_ev_note.off_velocity = 0; + } + midiport.SendEvent (ev); + } + } + } + + + + 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 ()); + + 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 (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 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["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 xe in el.GetElementsByTagName("Ligne")) + lignes.Add(Ligne.Load(conduite,xe as System.Xml.XmlElement)); + } + + + static System.Text.RegularExpressions.Regex regexCommand1 = new System.Text.RegularExpressions.Regex( + @"(?\d+)", + System.Text.RegularExpressions.RegexOptions.Compiled); + + static System.Text.RegularExpressions.Regex regexCommand2 = new System.Text.RegularExpressions.Regex( + @"(?\d+)(?(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; + + if(effet>=lignes.Count) return; + enCours = lignes[effet]; + ligneMaitre = enCours; + timeStamp = TimeSpan.Zero; + + topPresent = false; + int index = IndexLigneEnCours+1; + if(index= TimeSpan.Zero) + { + topPresent = true; + topSuivant= lignes[index].Top; + } + } + aSuivre = null; + + LanceCommandeMidi(); + + 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); + } + } + + } +} diff --git a/DMX-2.0/SequenceurOSC.cs b/DMX-2.0/SequenceurOSC.cs new file mode 100644 index 0000000..c781214 --- /dev/null +++ b/DMX-2.0/SequenceurOSC.cs @@ -0,0 +1,537 @@ +/* + + 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 . +*/ + +using System; +using System.Collections.Generic; +using System.Xml; +using System.Collections.ObjectModel; +using System.Threading; +using System.Net.Sockets; +using System.Net; + +namespace DMX2 +{ + public class SequenceurOSC : Sequenceur + { + public class Ligne { + public Ligne(){} + string nom = string.Empty; + TimeSpan top = TimeSpan.MinValue; + + string commande =null; + + public string Nom { + get { + return nom; + } + set { + nom = value; + } + } + + public TimeSpan Top { + get { + return top; + } + set { + top = value; + } + } + + public string Commande { + get { + return commande; + } + set{ + commande = 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 ("cmd", commande); + + } + + 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.commande = el.GetAttribute ("cmd"); + + return l; + } + } + + + + List lignes = new List(); + + Ligne aSuivre = null; + Ligne enCours = null; + Ligne ligneMaitre = null; + + TimeSpan timeStamp = TimeSpan.Zero; + TimeSpan topSuivant = TimeSpan.Zero; + bool topPresent = false; + + actionEventTarget goNextEventTarget=null; + actionEventTarget goBackEventTarget=null; + + string destination=""; + + SeqOscUI ui = null; + bool change = false; + + UdpClient udpClient = new UdpClient(); + IPEndPoint iPEndPoint = null; + + + bool paused=false; + + public bool Paused { + get { + return paused; + } + set { + paused = value; + } + } + + public string Destination + { + get + { + return destination; + } + set + { + destination = value; + SetEndpoint(); + } + } + + private void SetEndpoint() + { + IPAddress iPAddress; + int port; + string[] st = destination.Split(':'); + iPEndPoint = null; + if (st.Length != 2) return; + if (!IPAddress.TryParse(st[0], out iPAddress)) return; + if (!int.TryParse(st[1], out port)) return; + iPEndPoint = new IPEndPoint(iPAddress, port); + udpClient.Connect(iPEndPoint); + } + + public SequenceurOSC () + { + + 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 Lignes { + get { + return lignes.AsReadOnly(); + } + } + + public override int ValeurCircuit (Circuit c) + { + return 0; + } + + public override void Tick (TimeSpan time) + { + if (paused) + return; + timeStamp += time; + + if (Monitor.TryEnter (this)) { + try { + while (topPresent&&(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= TimeSpan.Zero) + { + topPresent = true; + topSuivant= lignes[index].Top; + } + } + aSuivre = null; + LanceCommandeOSC(); + if(ui!=null) + ui.EffetChange(); + } + } + + void LanceCommandeOSC() + { + + Console.WriteLine(enCours.Commande); + + if (enCours.Commande == null) return; + if (enCours.Commande.Length == 0) return; + if (iPEndPoint == null) return; + + string[] data = enCours.Commande.Split(' '); + + OSCMessage message = new OSCMessage(data[0]); + for (int i = 1; i < data.Length; i++) + { + if (int.TryParse(data[i], out int di)) + message.AddInt(di); + else if (float.TryParse(data[i], out float df)) + message.AddFloat(df); + else message.AddString(data[i]); + } + + + var buff = message.Encode(); + udpClient.Send(buff, buff.Length); + } + + + + 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 ("SequenceurOSC"); + System.Xml.XmlElement xmlEl; + + parent.AppendChild (el); + el.SetAttribute ("id", ID.ToString ()); + el.SetAttribute ("name", Name); + el.SetAttribute ("destination", Destination); + //el.SetAttribute ("master", master.ToString ()); + + 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 (Ligne li in lignes) { + li.Save(el); + } + + } + + + public override SequenceurUI GetUI () + { + + if (ui == null) { + ui = new SeqOscUI (this); + ui.Destroyed += UiDestroyed; + } + + return ui; + } + + void UiDestroyed (object sender, EventArgs e) + { + ui = null; + } + + 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 SequenceurOSC Load (Conduite conduite, System.Xml.XmlElement el) + { + SequenceurOSC seq = new SequenceurOSC(); + 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"); + Destination = el.TryGetAttribute("destination", "224.0.0.3:8888"); + + XmlElement xmlE; + + + 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 xe in el.GetElementsByTagName("Ligne")) + lignes.Add(Ligne.Load(conduite,xe as System.Xml.XmlElement)); + } + + + static System.Text.RegularExpressions.Regex regexCommand1 = new System.Text.RegularExpressions.Regex( + @"(?\d+)", + System.Text.RegularExpressions.RegexOptions.Compiled); + + static System.Text.RegularExpressions.Regex regexCommand2 = new System.Text.RegularExpressions.Regex( + @"(?\d+)(?(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; + + if(effet>=lignes.Count) return; + enCours = lignes[effet]; + ligneMaitre = enCours; + timeStamp = TimeSpan.Zero; + + topPresent = false; + int index = IndexLigneEnCours+1; + if(index= TimeSpan.Zero) + { + topPresent = true; + topSuivant= lignes[index].Top; + } + } + aSuivre = null; + + LanceCommandeOSC(); + + 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); + } + } + + } +} diff --git a/DMX-2.0/SequenceurSon.cs b/DMX-2.0/SequenceurSon.cs index 3491588..093ec57 100644 --- a/DMX-2.0/SequenceurSon.cs +++ b/DMX-2.0/SequenceurSon.cs @@ -133,16 +133,24 @@ namespace DMX2 get{ return volume;} set { volume=value; - mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume); + if (mplayerProcess != null && !mplayerProcess.HasExited) + { + if (!Paused) + mplayerProcess.StandardInput.WriteLine("volume {0} 1", volume); + } volumeEventTarget.FeedBack (); } } public TimeSpan PlayTime { get{ - if(mplayerProcess!=null && !mplayerProcess.HasExited) - mplayerProcess.StandardInput.WriteLine ("get_time_pos"); - return position; + if (mplayerProcess != null && !mplayerProcess.HasExited) + { + if (!Paused) + mplayerProcess.StandardInput.WriteLine("get_time_pos"); + + } + return position; } set{ if (CheckMplayer ()) { @@ -171,13 +179,16 @@ namespace DMX2 curfile = files[pos]; Stop(); - mplayerProcess.StandardInput.WriteLine ("volume 0 1"); - mplayerProcess.StandardInput.WriteLine ("loadfile \"{0}\" 0", curfile); - mplayerProcess.StandardInput.WriteLine ("get_time_length"); - //mplayerProcess.StandardInput.WriteLine ("pausing seek 0 2"); - mplayerProcess.StandardInput.WriteLine ("pause"); - mplayerProcess.StandardInput.WriteLine ("seek 0 2"); - mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume); + //mplayerProcess.StandardInput.WriteLine ("volume 0 1"); // old + mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume); + mplayerProcess.StandardInput.WriteLine ("pausing loadfile \"{0}\"", curfile); + mplayerProcess.StandardInput.WriteLine ("pausing get_time_length"); + //mplayerProcess.StandardInput.WriteLine("loadfile \"{0}\"", curfile); //old + //mplayerProcess.StandardInput.WriteLine("get_time_length"); //old + ////mplayerProcess.StandardInput.WriteLine ("pausing seek 0 2"); //old + //mplayerProcess.StandardInput.WriteLine ("pause"); //old + //mplayerProcess.StandardInput.WriteLine ("seek 0 2"); //old + //mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume); //old Paused = true; } @@ -187,8 +198,9 @@ namespace DMX2 return; if (!CheckMplayer ()) return; - mplayerProcess.StandardInput.WriteLine ("pause"); - Paused = false; + mplayerProcess.StandardInput.WriteLine ("pause"); + mplayerProcess.StandardInput.WriteLine ("volume {0} 1", volume); + Paused = false; } public void Pause () diff --git a/DMX-2.0/gtk-gui/DMX2.About.cs b/DMX-2.0/gtk-gui/DMX2.About.cs index 68356da..39b9609 100644 --- a/DMX-2.0/gtk-gui/DMX2.About.cs +++ b/DMX-2.0/gtk-gui/DMX2.About.cs @@ -4,12 +4,13 @@ namespace DMX2 { public partial class About { - private global::Gtk.Label label1; + private global::Gtk.Label labelA; + private global::Gtk.Button buttonOk; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.About this.Name = "DMX2.About"; this.WindowPosition = ((global::Gtk.WindowPosition)(4)); @@ -19,11 +20,13 @@ namespace DMX2 w1.Name = "dialog1_VBox"; w1.BorderWidth = ((uint)(2)); // Container child dialog1_VBox.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); - this.label1.Name = "label1"; - this.label1.LabelProp = "Loupiottes\n\nLogiciel de contrôle DMX 512\n\nCopyright (C) Arnaud Houdelette\t\t2012-2014\nCopyright (C) Emmanuel Langlois\t\t2012-2014\nhttp://www.loupiottes.fr\nLicence : GPL V2"; - w1.Add (this.label1); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1 [this.label1])); + this.labelA = new global::Gtk.Label(); + this.labelA.Name = "labelA"; + this.labelA.LabelProp = "Loupiottes\n\nLogiciel de contrôle DMX 512\n\nCopyright (C) Arnaud Houdelette\t\t2012-" + + "2014\nCopyright (C) Emmanuel Langlois\t\t2012-2014\nhttp://www.loupiottes.fr\nLicence" + + " : GPL V2"; + w1.Add(this.labelA); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1[this.labelA])); w2.Position = 0; w2.Expand = false; w2.Fill = false; @@ -34,24 +37,25 @@ namespace DMX2 w3.BorderWidth = ((uint)(5)); w3.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonOk = new global::Gtk.Button (); + this.buttonOk = new global::Gtk.Button(); this.buttonOk.CanDefault = true; this.buttonOk.CanFocus = true; this.buttonOk.Name = "buttonOk"; this.buttonOk.UseStock = true; this.buttonOk.UseUnderline = true; this.buttonOk.Label = "gtk-close"; - this.AddActionWidget (this.buttonOk, -7); - global::Gtk.ButtonBox.ButtonBoxChild w4 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w3 [this.buttonOk])); + this.AddActionWidget(this.buttonOk, -7); + global::Gtk.ButtonBox.ButtonBoxChild w4 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonOk])); w4.Expand = false; w4.Fill = false; - if ((this.Child != null)) { - this.Child.ShowAll (); + if ((this.Child != null)) + { + this.Child.ShowAll(); } this.DefaultWidth = 400; this.DefaultHeight = 300; - this.Show (); - this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked); + this.Show(); + this.buttonOk.Clicked += new global::System.EventHandler(this.OnButtonOkClicked); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.DriverBoitierV1UI.cs b/DMX-2.0/gtk-gui/DMX2.DriverBoitierV1UI.cs index 9c98093..89f1ee2 100644 --- a/DMX-2.0/gtk-gui/DMX2.DriverBoitierV1UI.cs +++ b/DMX-2.0/gtk-gui/DMX2.DriverBoitierV1UI.cs @@ -5,44 +5,52 @@ namespace DMX2 public partial class DriverBoitierV1UI { private global::Gtk.VBox vbox2; - private global::Gtk.Label label1; + + private global::Gtk.Label labelT; + private global::Gtk.Table table1; + private global::Gtk.ComboBox cbUnivers; + private global::Gtk.Label label4; + private global::Gtk.Label label5; + private global::Gtk.Label lblEtat; + private global::Gtk.HBox hbox1; + private global::Gtk.Button btnValider; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.DriverBoitierV1UI - global::Stetic.BinContainer.Attach (this); + global::Stetic.BinContainer.Attach(this); this.Name = "DMX2.DriverBoitierV1UI"; // Container child DMX2.DriverBoitierV1UI.Gtk.Container+ContainerChild - this.vbox2 = new global::Gtk.VBox (); + this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); - this.label1.Name = "label1"; - this.label1.LabelProp = "Driver Boitier V1"; - this.vbox2.Add (this.label1); - global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label1])); + this.labelT = new global::Gtk.Label(); + this.labelT.Name = "labelT"; + this.labelT.LabelProp = "Driver Boitier V1"; + this.vbox2.Add(this.labelT); + global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.labelT])); w1.Position = 0; w1.Expand = false; w1.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.table1 = new global::Gtk.Table (((uint)(3)), ((uint)(2)), false); + this.table1 = new global::Gtk.Table(((uint)(3)), ((uint)(2)), false); this.table1.Name = "table1"; this.table1.RowSpacing = ((uint)(6)); this.table1.ColumnSpacing = ((uint)(6)); // Container child table1.Gtk.Table+TableChild - this.cbUnivers = global::Gtk.ComboBox.NewText (); + this.cbUnivers = global::Gtk.ComboBox.NewText(); this.cbUnivers.Name = "cbUnivers"; - this.table1.Add (this.cbUnivers); - global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1 [this.cbUnivers])); + this.table1.Add(this.cbUnivers); + global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1[this.cbUnivers])); w2.TopAttach = ((uint)(1)); w2.BottomAttach = ((uint)(2)); w2.LeftAttach = ((uint)(1)); @@ -50,62 +58,63 @@ namespace DMX2 w2.XOptions = ((global::Gtk.AttachOptions)(4)); w2.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label4 = new global::Gtk.Label (); + this.label4 = new global::Gtk.Label(); this.label4.Name = "label4"; this.label4.LabelProp = "Univers DMX :"; - this.table1.Add (this.label4); - global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1 [this.label4])); + this.table1.Add(this.label4); + global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1[this.label4])); w3.TopAttach = ((uint)(1)); w3.BottomAttach = ((uint)(2)); w3.XOptions = ((global::Gtk.AttachOptions)(4)); w3.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label5 = new global::Gtk.Label (); + this.label5 = new global::Gtk.Label(); this.label5.Name = "label5"; this.label5.LabelProp = "Etat :"; - this.table1.Add (this.label5); - global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1 [this.label5])); + this.table1.Add(this.label5); + global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1[this.label5])); w4.XOptions = ((global::Gtk.AttachOptions)(4)); w4.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.lblEtat = new global::Gtk.Label (); + this.lblEtat = new global::Gtk.Label(); this.lblEtat.Name = "lblEtat"; this.lblEtat.LabelProp = "Univer associé"; - this.table1.Add (this.lblEtat); - global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1 [this.lblEtat])); + this.table1.Add(this.lblEtat); + global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1[this.lblEtat])); w5.LeftAttach = ((uint)(1)); w5.RightAttach = ((uint)(2)); w5.XOptions = ((global::Gtk.AttachOptions)(4)); w5.YOptions = ((global::Gtk.AttachOptions)(4)); - this.vbox2.Add (this.table1); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1])); + this.vbox2.Add(this.table1); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.table1])); w6.Position = 1; // Container child vbox2.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox (); + this.hbox1 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.btnValider = new global::Gtk.Button (); + this.btnValider = new global::Gtk.Button(); this.btnValider.CanFocus = true; this.btnValider.Name = "btnValider"; this.btnValider.UseUnderline = true; this.btnValider.Label = "Valider"; - this.hbox1.Add (this.btnValider); - global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btnValider])); + this.hbox1.Add(this.btnValider); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnValider])); w7.Position = 1; w7.Expand = false; w7.Fill = false; - this.vbox2.Add (this.hbox1); - global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1])); + this.vbox2.Add(this.hbox1); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); w8.Position = 2; w8.Expand = false; w8.Fill = false; - this.Add (this.vbox2); - if ((this.Child != null)) { - this.Child.ShowAll (); + this.Add(this.vbox2); + if ((this.Child != null)) + { + this.Child.ShowAll(); } - this.Hide (); - this.btnValider.Clicked += new global::System.EventHandler (this.OnBtnValiderClicked); + this.Hide(); + this.btnValider.Clicked += new global::System.EventHandler(this.OnBtnValiderClicked); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.DriverBoitierV2UI.cs b/DMX-2.0/gtk-gui/DMX2.DriverBoitierV2UI.cs index a261611..bda528c 100644 --- a/DMX-2.0/gtk-gui/DMX2.DriverBoitierV2UI.cs +++ b/DMX-2.0/gtk-gui/DMX2.DriverBoitierV2UI.cs @@ -5,57 +5,75 @@ namespace DMX2 public partial class DriverBoitierV2UI { private global::Gtk.VBox vbox2; - private global::Gtk.Label label1; + + private global::Gtk.Label labelT; + private global::Gtk.Table table1; + private global::Gtk.Entry caseBrk; + private global::Gtk.Entry caseMab; + private global::Gtk.ComboBox cbUnivers1; + private global::Gtk.ComboBox cbUnivers2; + private global::Gtk.CheckButton chkMerge1; + private global::Gtk.CheckButton chkMerge2; + private global::Gtk.Label label2; + private global::Gtk.Label label3; + private global::Gtk.Label label4; + private global::Gtk.Label label5; + private global::Gtk.Label label6; + private global::Gtk.Label label7; + private global::Gtk.Label label8; + private global::Gtk.HBox hbox1; + private global::Gtk.Button btnValider; + private global::Gtk.Button btnInit; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.DriverBoitierV2UI - global::Stetic.BinContainer.Attach (this); + global::Stetic.BinContainer.Attach(this); this.Name = "DMX2.DriverBoitierV2UI"; // Container child DMX2.DriverBoitierV2UI.Gtk.Container+ContainerChild - this.vbox2 = new global::Gtk.VBox (); + this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); - this.label1.Name = "label1"; - this.label1.LabelProp = "Driver V2"; - this.vbox2.Add (this.label1); - global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label1])); + this.labelT = new global::Gtk.Label(); + this.labelT.Name = "labelT"; + this.labelT.LabelProp = "Driver V2"; + this.vbox2.Add(this.labelT); + global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.labelT])); w1.Position = 0; w1.Expand = false; w1.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.table1 = new global::Gtk.Table (((uint)(4)), ((uint)(5)), false); + this.table1 = new global::Gtk.Table(((uint)(4)), ((uint)(5)), false); this.table1.Name = "table1"; this.table1.RowSpacing = ((uint)(6)); this.table1.ColumnSpacing = ((uint)(6)); // Container child table1.Gtk.Table+TableChild - this.caseBrk = new global::Gtk.Entry (); + this.caseBrk = new global::Gtk.Entry(); this.caseBrk.CanFocus = true; this.caseBrk.Name = "caseBrk"; this.caseBrk.IsEditable = true; this.caseBrk.InvisibleChar = '•'; - this.table1.Add (this.caseBrk); - global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1 [this.caseBrk])); + this.table1.Add(this.caseBrk); + global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1[this.caseBrk])); w2.TopAttach = ((uint)(1)); w2.BottomAttach = ((uint)(2)); w2.LeftAttach = ((uint)(2)); @@ -63,13 +81,13 @@ namespace DMX2 w2.XOptions = ((global::Gtk.AttachOptions)(4)); w2.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.caseMab = new global::Gtk.Entry (); + this.caseMab = new global::Gtk.Entry(); this.caseMab.CanFocus = true; this.caseMab.Name = "caseMab"; this.caseMab.IsEditable = true; this.caseMab.InvisibleChar = '•'; - this.table1.Add (this.caseMab); - global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1 [this.caseMab])); + this.table1.Add(this.caseMab); + global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1[this.caseMab])); w3.TopAttach = ((uint)(1)); w3.BottomAttach = ((uint)(2)); w3.LeftAttach = ((uint)(3)); @@ -77,10 +95,10 @@ namespace DMX2 w3.XOptions = ((global::Gtk.AttachOptions)(4)); w3.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.cbUnivers1 = global::Gtk.ComboBox.NewText (); + this.cbUnivers1 = global::Gtk.ComboBox.NewText(); this.cbUnivers1.Name = "cbUnivers1"; - this.table1.Add (this.cbUnivers1); - global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1 [this.cbUnivers1])); + this.table1.Add(this.cbUnivers1); + global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1[this.cbUnivers1])); w4.TopAttach = ((uint)(1)); w4.BottomAttach = ((uint)(2)); w4.LeftAttach = ((uint)(1)); @@ -88,10 +106,10 @@ namespace DMX2 w4.XOptions = ((global::Gtk.AttachOptions)(4)); w4.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.cbUnivers2 = global::Gtk.ComboBox.NewText (); + this.cbUnivers2 = global::Gtk.ComboBox.NewText(); this.cbUnivers2.Name = "cbUnivers2"; - this.table1.Add (this.cbUnivers2); - global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1 [this.cbUnivers2])); + this.table1.Add(this.cbUnivers2); + global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1[this.cbUnivers2])); w5.TopAttach = ((uint)(2)); w5.BottomAttach = ((uint)(3)); w5.LeftAttach = ((uint)(1)); @@ -99,14 +117,14 @@ namespace DMX2 w5.XOptions = ((global::Gtk.AttachOptions)(4)); w5.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.chkMerge1 = new global::Gtk.CheckButton (); + this.chkMerge1 = new global::Gtk.CheckButton(); this.chkMerge1.CanFocus = true; this.chkMerge1.Name = "chkMerge1"; this.chkMerge1.Label = ""; this.chkMerge1.DrawIndicator = true; this.chkMerge1.UseUnderline = true; - this.table1.Add (this.chkMerge1); - global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table1 [this.chkMerge1])); + this.table1.Add(this.chkMerge1); + global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table1[this.chkMerge1])); w6.TopAttach = ((uint)(1)); w6.BottomAttach = ((uint)(2)); w6.LeftAttach = ((uint)(4)); @@ -114,14 +132,14 @@ namespace DMX2 w6.XOptions = ((global::Gtk.AttachOptions)(4)); w6.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.chkMerge2 = new global::Gtk.CheckButton (); + this.chkMerge2 = new global::Gtk.CheckButton(); this.chkMerge2.CanFocus = true; this.chkMerge2.Name = "chkMerge2"; this.chkMerge2.Label = ""; this.chkMerge2.DrawIndicator = true; this.chkMerge2.UseUnderline = true; - this.table1.Add (this.chkMerge2); - global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1 [this.chkMerge2])); + this.table1.Add(this.chkMerge2); + global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1[this.chkMerge2])); w7.TopAttach = ((uint)(2)); w7.BottomAttach = ((uint)(3)); w7.LeftAttach = ((uint)(4)); @@ -129,115 +147,116 @@ namespace DMX2 w7.XOptions = ((global::Gtk.AttachOptions)(4)); w7.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label2 = new global::Gtk.Label (); + this.label2 = new global::Gtk.Label(); this.label2.Name = "label2"; this.label2.LabelProp = "Etat"; - this.table1.Add (this.label2); - global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1 [this.label2])); + this.table1.Add(this.label2); + global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1[this.label2])); w8.XOptions = ((global::Gtk.AttachOptions)(4)); w8.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label3 = new global::Gtk.Label (); + this.label3 = new global::Gtk.Label(); this.label3.Name = "label3"; this.label3.LabelProp = "Univer associé"; - this.table1.Add (this.label3); - global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1 [this.label3])); + this.table1.Add(this.label3); + global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.label3])); w9.LeftAttach = ((uint)(1)); w9.RightAttach = ((uint)(2)); w9.XOptions = ((global::Gtk.AttachOptions)(4)); w9.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label4 = new global::Gtk.Label (); + this.label4 = new global::Gtk.Label(); this.label4.Name = "label4"; this.label4.LabelProp = "Break"; - this.table1.Add (this.label4); - global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1 [this.label4])); + this.table1.Add(this.label4); + global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1[this.label4])); w10.LeftAttach = ((uint)(2)); w10.RightAttach = ((uint)(3)); w10.XOptions = ((global::Gtk.AttachOptions)(4)); w10.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label5 = new global::Gtk.Label (); + this.label5 = new global::Gtk.Label(); this.label5.Name = "label5"; this.label5.LabelProp = "MAB"; - this.table1.Add (this.label5); - global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1 [this.label5])); + this.table1.Add(this.label5); + global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.label5])); w11.LeftAttach = ((uint)(3)); w11.RightAttach = ((uint)(4)); w11.XOptions = ((global::Gtk.AttachOptions)(4)); w11.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label6 = new global::Gtk.Label (); + this.label6 = new global::Gtk.Label(); this.label6.Name = "label6"; this.label6.LabelProp = "Block 1"; - this.table1.Add (this.label6); - global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1 [this.label6])); + this.table1.Add(this.label6); + global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.label6])); w12.TopAttach = ((uint)(1)); w12.BottomAttach = ((uint)(2)); w12.XOptions = ((global::Gtk.AttachOptions)(4)); w12.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label7 = new global::Gtk.Label (); + this.label7 = new global::Gtk.Label(); this.label7.Name = "label7"; this.label7.LabelProp = "Block 2"; - this.table1.Add (this.label7); - global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1 [this.label7])); + this.table1.Add(this.label7); + global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.label7])); w13.TopAttach = ((uint)(2)); w13.BottomAttach = ((uint)(3)); w13.XOptions = ((global::Gtk.AttachOptions)(4)); w13.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label8 = new global::Gtk.Label (); + this.label8 = new global::Gtk.Label(); this.label8.Name = "label8"; this.label8.LabelProp = "Merge"; - this.table1.Add (this.label8); - global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1 [this.label8])); + this.table1.Add(this.label8); + global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.label8])); w14.LeftAttach = ((uint)(4)); w14.RightAttach = ((uint)(5)); w14.XOptions = ((global::Gtk.AttachOptions)(4)); w14.YOptions = ((global::Gtk.AttachOptions)(4)); - this.vbox2.Add (this.table1); - global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1])); + this.vbox2.Add(this.table1); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.table1])); w15.Position = 1; // Container child vbox2.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox (); + this.hbox1 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.btnValider = new global::Gtk.Button (); + this.btnValider = new global::Gtk.Button(); this.btnValider.CanFocus = true; this.btnValider.Name = "btnValider"; this.btnValider.UseUnderline = true; this.btnValider.Label = "Valider"; - this.hbox1.Add (this.btnValider); - global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btnValider])); + this.hbox1.Add(this.btnValider); + global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnValider])); w16.Position = 1; w16.Expand = false; w16.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.btnInit = new global::Gtk.Button (); + this.btnInit = new global::Gtk.Button(); this.btnInit.CanFocus = true; this.btnInit.Name = "btnInit"; this.btnInit.UseUnderline = true; this.btnInit.Label = "Init Boitier"; - this.hbox1.Add (this.btnInit); - global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btnInit])); + this.hbox1.Add(this.btnInit); + global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnInit])); w17.Position = 2; w17.Expand = false; w17.Fill = false; - this.vbox2.Add (this.hbox1); - global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1])); + this.vbox2.Add(this.hbox1); + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); w18.PackType = ((global::Gtk.PackType)(1)); w18.Position = 2; w18.Expand = false; w18.Fill = false; - this.Add (this.vbox2); - if ((this.Child != null)) { - this.Child.ShowAll (); + this.Add(this.vbox2); + if ((this.Child != null)) + { + this.Child.ShowAll(); } - this.Hide (); - this.btnValider.Clicked += new global::System.EventHandler (this.OnButtonValider); - this.btnInit.Clicked += new global::System.EventHandler (this.OnBtnInitClicked); + this.Hide(); + this.btnValider.Clicked += new global::System.EventHandler(this.OnButtonValider); + this.btnInit.Clicked += new global::System.EventHandler(this.OnBtnInitClicked); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.DriverBoitierV3UI.cs b/DMX-2.0/gtk-gui/DMX2.DriverBoitierV3UI.cs index d99e649..e585cb6 100644 --- a/DMX-2.0/gtk-gui/DMX2.DriverBoitierV3UI.cs +++ b/DMX-2.0/gtk-gui/DMX2.DriverBoitierV3UI.cs @@ -5,60 +5,81 @@ namespace DMX2 public partial class DriverBoitierV3UI { private global::Gtk.VBox vbox2; - private global::Gtk.Label label1; + + private global::Gtk.Label labelT; + private global::Gtk.Table table1; + private global::Gtk.Entry caseBrk; + private global::Gtk.Entry caseCircuits; + private global::Gtk.Entry caseDMXInt; + private global::Gtk.Entry caseMab; + private global::Gtk.Entry caseUSBRef; + private global::Gtk.ComboBox cbUnivers1; + private global::Gtk.CheckButton chkMerge1; + private global::Gtk.CheckButton chkSync; + private global::Gtk.Label label10; + private global::Gtk.Label label3; + private global::Gtk.Label label4; + private global::Gtk.Label label5; + private global::Gtk.Label label8; + private global::Gtk.Label label9; + private global::Gtk.Label labelsync; + private global::Gtk.Label lblDMX; + private global::Gtk.HBox hbox1; + private global::Gtk.Button btnValider; + private global::Gtk.Button btnInit; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.DriverBoitierV3UI - global::Stetic.BinContainer.Attach (this); + global::Stetic.BinContainer.Attach(this); this.Name = "DMX2.DriverBoitierV3UI"; // Container child DMX2.DriverBoitierV3UI.Gtk.Container+ContainerChild - this.vbox2 = new global::Gtk.VBox (); + this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); - this.label1.Name = "label1"; - this.label1.LabelProp = "Driver V3"; - this.vbox2.Add (this.label1); - global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label1])); + this.labelT = new global::Gtk.Label(); + this.labelT.Name = "labelT"; + this.labelT.LabelProp = "Driver V3"; + this.vbox2.Add(this.labelT); + global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.labelT])); w1.Position = 0; w1.Expand = false; w1.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.table1 = new global::Gtk.Table (((uint)(5)), ((uint)(4)), false); + this.table1 = new global::Gtk.Table(((uint)(5)), ((uint)(4)), false); this.table1.Name = "table1"; this.table1.RowSpacing = ((uint)(6)); this.table1.ColumnSpacing = ((uint)(6)); // Container child table1.Gtk.Table+TableChild - this.caseBrk = new global::Gtk.Entry (); + this.caseBrk = new global::Gtk.Entry(); this.caseBrk.CanFocus = true; this.caseBrk.Name = "caseBrk"; this.caseBrk.IsEditable = true; this.caseBrk.InvisibleChar = '•'; - this.table1.Add (this.caseBrk); - global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1 [this.caseBrk])); + this.table1.Add(this.caseBrk); + global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table1[this.caseBrk])); w2.TopAttach = ((uint)(1)); w2.BottomAttach = ((uint)(2)); w2.LeftAttach = ((uint)(1)); @@ -66,50 +87,50 @@ namespace DMX2 w2.XOptions = ((global::Gtk.AttachOptions)(4)); w2.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.caseCircuits = new global::Gtk.Entry (); + this.caseCircuits = new global::Gtk.Entry(); this.caseCircuits.CanFocus = true; this.caseCircuits.Name = "caseCircuits"; this.caseCircuits.IsEditable = true; this.caseCircuits.InvisibleChar = '•'; - this.table1.Add (this.caseCircuits); - global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1 [this.caseCircuits])); + this.table1.Add(this.caseCircuits); + global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1[this.caseCircuits])); w3.LeftAttach = ((uint)(3)); w3.RightAttach = ((uint)(4)); w3.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.caseDMXInt = new global::Gtk.Entry (); + this.caseDMXInt = new global::Gtk.Entry(); this.caseDMXInt.CanFocus = true; this.caseDMXInt.Name = "caseDMXInt"; this.caseDMXInt.IsEditable = true; this.caseDMXInt.InvisibleChar = '•'; - this.table1.Add (this.caseDMXInt); - global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1 [this.caseDMXInt])); + this.table1.Add(this.caseDMXInt); + global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table1[this.caseDMXInt])); w4.TopAttach = ((uint)(3)); w4.BottomAttach = ((uint)(4)); w4.LeftAttach = ((uint)(3)); w4.RightAttach = ((uint)(4)); w4.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.caseMab = new global::Gtk.Entry (); + this.caseMab = new global::Gtk.Entry(); this.caseMab.CanFocus = true; this.caseMab.Name = "caseMab"; this.caseMab.IsEditable = true; this.caseMab.InvisibleChar = '•'; - this.table1.Add (this.caseMab); - global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1 [this.caseMab])); + this.table1.Add(this.caseMab); + global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1[this.caseMab])); w5.TopAttach = ((uint)(1)); w5.BottomAttach = ((uint)(2)); w5.LeftAttach = ((uint)(3)); w5.RightAttach = ((uint)(4)); w5.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.caseUSBRef = new global::Gtk.Entry (); + this.caseUSBRef = new global::Gtk.Entry(); this.caseUSBRef.CanFocus = true; this.caseUSBRef.Name = "caseUSBRef"; this.caseUSBRef.IsEditable = true; this.caseUSBRef.InvisibleChar = '•'; - this.table1.Add (this.caseUSBRef); - global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table1 [this.caseUSBRef])); + this.table1.Add(this.caseUSBRef); + global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table1[this.caseUSBRef])); w6.TopAttach = ((uint)(3)); w6.BottomAttach = ((uint)(4)); w6.LeftAttach = ((uint)(1)); @@ -117,37 +138,37 @@ namespace DMX2 w6.XOptions = ((global::Gtk.AttachOptions)(4)); w6.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.cbUnivers1 = global::Gtk.ComboBox.NewText (); + this.cbUnivers1 = global::Gtk.ComboBox.NewText(); this.cbUnivers1.Name = "cbUnivers1"; - this.table1.Add (this.cbUnivers1); - global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1 [this.cbUnivers1])); + this.table1.Add(this.cbUnivers1); + global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1[this.cbUnivers1])); w7.LeftAttach = ((uint)(1)); w7.RightAttach = ((uint)(2)); w7.XOptions = ((global::Gtk.AttachOptions)(4)); w7.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.chkMerge1 = new global::Gtk.CheckButton (); + this.chkMerge1 = new global::Gtk.CheckButton(); this.chkMerge1.CanFocus = true; this.chkMerge1.Name = "chkMerge1"; this.chkMerge1.Label = ""; this.chkMerge1.DrawIndicator = true; this.chkMerge1.UseUnderline = true; - this.table1.Add (this.chkMerge1); - global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1 [this.chkMerge1])); + this.table1.Add(this.chkMerge1); + global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1[this.chkMerge1])); w8.TopAttach = ((uint)(2)); w8.BottomAttach = ((uint)(3)); w8.LeftAttach = ((uint)(3)); w8.RightAttach = ((uint)(4)); w8.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.chkSync = new global::Gtk.CheckButton (); + this.chkSync = new global::Gtk.CheckButton(); this.chkSync.CanFocus = true; this.chkSync.Name = "chkSync"; this.chkSync.Label = ""; this.chkSync.DrawIndicator = true; this.chkSync.UseUnderline = true; - this.table1.Add (this.chkSync); - global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1 [this.chkSync])); + this.table1.Add(this.chkSync); + global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.chkSync])); w9.TopAttach = ((uint)(2)); w9.BottomAttach = ((uint)(3)); w9.LeftAttach = ((uint)(1)); @@ -155,39 +176,39 @@ namespace DMX2 w9.XOptions = ((global::Gtk.AttachOptions)(4)); w9.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label10 = new global::Gtk.Label (); + this.label10 = new global::Gtk.Label(); this.label10.Name = "label10"; this.label10.LabelProp = "Freq. USB (ms)"; - this.table1.Add (this.label10); - global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1 [this.label10])); + this.table1.Add(this.label10); + global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1[this.label10])); w10.TopAttach = ((uint)(3)); w10.BottomAttach = ((uint)(4)); w10.XOptions = ((global::Gtk.AttachOptions)(4)); w10.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label3 = new global::Gtk.Label (); + this.label3 = new global::Gtk.Label(); this.label3.Name = "label3"; this.label3.LabelProp = "Univer associé"; - this.table1.Add (this.label3); - global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1 [this.label3])); + this.table1.Add(this.label3); + global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.label3])); w11.XOptions = ((global::Gtk.AttachOptions)(4)); w11.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label4 = new global::Gtk.Label (); + this.label4 = new global::Gtk.Label(); this.label4.Name = "label4"; this.label4.LabelProp = "Break (µs)"; - this.table1.Add (this.label4); - global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1 [this.label4])); + this.table1.Add(this.label4); + global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.label4])); w12.TopAttach = ((uint)(1)); w12.BottomAttach = ((uint)(2)); w12.XOptions = ((global::Gtk.AttachOptions)(4)); w12.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label5 = new global::Gtk.Label (); + this.label5 = new global::Gtk.Label(); this.label5.Name = "label5"; this.label5.LabelProp = "MAB (µs)"; - this.table1.Add (this.label5); - global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1 [this.label5])); + this.table1.Add(this.label5); + global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.label5])); w13.TopAttach = ((uint)(1)); w13.BottomAttach = ((uint)(2)); w13.LeftAttach = ((uint)(2)); @@ -195,11 +216,11 @@ namespace DMX2 w13.XOptions = ((global::Gtk.AttachOptions)(4)); w13.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label8 = new global::Gtk.Label (); + this.label8 = new global::Gtk.Label(); this.label8.Name = "label8"; this.label8.LabelProp = "Merge"; - this.table1.Add (this.label8); - global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1 [this.label8])); + this.table1.Add(this.label8); + global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.label8])); w14.TopAttach = ((uint)(2)); w14.BottomAttach = ((uint)(3)); w14.LeftAttach = ((uint)(2)); @@ -207,83 +228,84 @@ namespace DMX2 w14.XOptions = ((global::Gtk.AttachOptions)(4)); w14.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.label9 = new global::Gtk.Label (); + this.label9 = new global::Gtk.Label(); this.label9.Name = "label9"; this.label9.LabelProp = "Circuits"; - this.table1.Add (this.label9); - global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1 [this.label9])); + this.table1.Add(this.label9); + global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.label9])); w15.LeftAttach = ((uint)(2)); w15.RightAttach = ((uint)(3)); w15.XOptions = ((global::Gtk.AttachOptions)(4)); w15.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.labelsync = new global::Gtk.Label (); + this.labelsync = new global::Gtk.Label(); this.labelsync.Name = "labelsync"; this.labelsync.LabelProp = "Syncro\nDMX<->USB"; - this.table1.Add (this.labelsync); - global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1 [this.labelsync])); + this.table1.Add(this.labelsync); + global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.labelsync])); w16.TopAttach = ((uint)(2)); w16.BottomAttach = ((uint)(3)); w16.XOptions = ((global::Gtk.AttachOptions)(4)); w16.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.lblDMX = new global::Gtk.Label (); + this.lblDMX = new global::Gtk.Label(); this.lblDMX.Name = "lblDMX"; this.lblDMX.LabelProp = "Intervale entre\ntrames DMX (ms)"; - this.table1.Add (this.lblDMX); - global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1 [this.lblDMX])); + this.table1.Add(this.lblDMX); + global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1[this.lblDMX])); w17.TopAttach = ((uint)(3)); w17.BottomAttach = ((uint)(4)); w17.LeftAttach = ((uint)(2)); w17.RightAttach = ((uint)(3)); w17.XOptions = ((global::Gtk.AttachOptions)(4)); w17.YOptions = ((global::Gtk.AttachOptions)(4)); - this.vbox2.Add (this.table1); - global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1])); + this.vbox2.Add(this.table1); + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.table1])); w18.Position = 1; w18.Expand = false; w18.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox (); + this.hbox1 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.btnValider = new global::Gtk.Button (); + this.btnValider = new global::Gtk.Button(); this.btnValider.CanFocus = true; this.btnValider.Name = "btnValider"; this.btnValider.UseUnderline = true; this.btnValider.Label = "Valider"; - this.hbox1.Add (this.btnValider); - global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btnValider])); + this.hbox1.Add(this.btnValider); + global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnValider])); w19.Position = 1; w19.Expand = false; w19.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.btnInit = new global::Gtk.Button (); + this.btnInit = new global::Gtk.Button(); this.btnInit.CanFocus = true; this.btnInit.Name = "btnInit"; this.btnInit.UseUnderline = true; this.btnInit.Label = "Init Boitier"; - this.hbox1.Add (this.btnInit); - global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btnInit])); + this.hbox1.Add(this.btnInit); + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnInit])); w20.Position = 2; w20.Expand = false; w20.Fill = false; - this.vbox2.Add (this.hbox1); - global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1])); + this.vbox2.Add(this.hbox1); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); w21.PackType = ((global::Gtk.PackType)(1)); w21.Position = 2; w21.Expand = false; w21.Fill = false; - this.Add (this.vbox2); - if ((this.Child != null)) { - this.Child.ShowAll (); + this.Add(this.vbox2); + if ((this.Child != null)) + { + this.Child.ShowAll(); } - this.Hide (); - this.chkSync.Toggled += new global::System.EventHandler (this.OnChkSyncToggled); - this.caseUSBRef.Changed += new global::System.EventHandler (this.OnCaseUSBRefChanged); - this.btnValider.Clicked += new global::System.EventHandler (this.OnButtonValider); - this.btnInit.Clicked += new global::System.EventHandler (this.OnBtnInitClicked); + this.Hide(); + this.chkSync.Toggled += new global::System.EventHandler(this.OnChkSyncToggled); + this.caseUSBRef.Changed += new global::System.EventHandler(this.OnCaseUSBRefChanged); + this.btnValider.Clicked += new global::System.EventHandler(this.OnButtonValider); + this.btnInit.Clicked += new global::System.EventHandler(this.OnBtnInitClicked); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.EditionUnivers.cs b/DMX-2.0/gtk-gui/DMX2.EditionUnivers.cs index c565f93..5774c45 100644 --- a/DMX-2.0/gtk-gui/DMX2.EditionUnivers.cs +++ b/DMX-2.0/gtk-gui/DMX2.EditionUnivers.cs @@ -5,42 +5,69 @@ namespace DMX2 public partial class EditionUnivers { private global::Gtk.UIManager UIManager; + private global::Gtk.HBox hbox2; - private global::Gtk.Label label1; + + private global::Gtk.Label labelU; + private global::Gtk.ComboBox cbUnivers; + private global::Gtk.HBox hbox3; + private global::Gtk.Button btAdd; + private global::Gtk.Button btDel; + private global::Gtk.Button btReset; + private global::Gtk.Button btPatchDroit; + private global::Gtk.HSeparator hseparator1; + private global::Gtk.HBox hbox1; + private global::Gtk.ToggleButton btAllume; + private global::Gtk.SpinButton spinDimmer; + private global::Gtk.Label label6; + private global::Gtk.ComboBox cbCircuit; + private global::Gtk.ComboBox cbFT; + private global::Gtk.Label lbParam1; + private global::Gtk.Entry txtParam1; + private global::Gtk.Label lbParam2; + private global::Gtk.Entry txtParam2; + private global::Gtk.Notebook notebook1; + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView tvDimm; + private global::Gtk.Label label2; + private global::Gtk.ScrolledWindow GtkScrolledWindow1; + private global::Gtk.TreeView tvCircuits; + private global::Gtk.Label label5; + private global::Gtk.Button buttonCancel; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.EditionUnivers - this.UIManager = new global::Gtk.UIManager (); - global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default"); - this.UIManager.InsertActionGroup (w1, 0); - this.AddAccelGroup (this.UIManager.AccelGroup); + this.UIManager = new global::Gtk.UIManager(); + global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default"); + this.UIManager.InsertActionGroup(w1, 0); + this.AddAccelGroup(this.UIManager.AccelGroup); this.Name = "DMX2.EditionUnivers"; this.TypeHint = ((global::Gdk.WindowTypeHint)(5)); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); @@ -49,341 +76,282 @@ namespace DMX2 w2.Name = "dialog1_VBox"; w2.BorderWidth = ((uint)(2)); // Container child dialog1_VBox.Gtk.Box+BoxChild - this.hbox2 = new global::Gtk.HBox (); + this.hbox2 = new global::Gtk.HBox(); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); - this.label1.Name = "label1"; - this.label1.LabelProp = "Univers :"; - this.hbox2.Add (this.label1); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label1])); + this.labelU = new global::Gtk.Label(); + this.labelU.Name = "labelU"; + this.labelU.LabelProp = "Univers :"; + this.hbox2.Add(this.labelU); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.labelU])); w3.Position = 0; w3.Expand = false; w3.Fill = false; // Container child hbox2.Gtk.Box+BoxChild - this.cbUnivers = global::Gtk.ComboBox.NewText (); + this.cbUnivers = global::Gtk.ComboBox.NewText(); this.cbUnivers.Name = "cbUnivers"; - this.hbox2.Add (this.cbUnivers); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.cbUnivers])); + this.hbox2.Add(this.cbUnivers); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.cbUnivers])); w4.Position = 1; w4.Expand = false; w4.Fill = false; // Container child hbox2.Gtk.Box+BoxChild - this.hbox3 = new global::Gtk.HBox (); + this.hbox3 = new global::Gtk.HBox(); this.hbox3.Name = "hbox3"; this.hbox3.Spacing = 6; // Container child hbox3.Gtk.Box+BoxChild - this.btAdd = new global::Gtk.Button (); + this.btAdd = new global::Gtk.Button(); this.btAdd.CanFocus = true; this.btAdd.Name = "btAdd"; this.btAdd.UseUnderline = true; - // Container child btAdd.Gtk.Container+ContainerChild - global::Gtk.Alignment w5 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w6 = new global::Gtk.HBox (); - w6.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w7 = new global::Gtk.Image (); - w7.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add", global::Gtk.IconSize.Menu); - w6.Add (w7); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w9 = new global::Gtk.Label (); - w9.LabelProp = "Nouvel Univers"; - w9.UseUnderline = true; - w6.Add (w9); - w5.Add (w6); - this.btAdd.Add (w5); - this.hbox3.Add (this.btAdd); - global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btAdd])); - w13.Position = 0; - w13.Expand = false; - w13.Fill = false; + this.btAdd.Label = "Nouvel Univers"; + global::Gtk.Image w5 = new global::Gtk.Image(); + w5.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-add", global::Gtk.IconSize.Menu); + this.btAdd.Image = w5; + this.hbox3.Add(this.btAdd); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btAdd])); + w6.Position = 0; + w6.Expand = false; + w6.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.btDel = new global::Gtk.Button (); + this.btDel = new global::Gtk.Button(); this.btDel.Sensitive = false; this.btDel.CanFocus = true; this.btDel.Name = "btDel"; this.btDel.UseUnderline = true; - // Container child btDel.Gtk.Container+ContainerChild - global::Gtk.Alignment w14 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w15 = new global::Gtk.HBox (); - w15.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w16 = new global::Gtk.Image (); - w16.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-remove", global::Gtk.IconSize.Menu); - w15.Add (w16); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w18 = new global::Gtk.Label (); - w18.LabelProp = "Supprimer"; - w18.UseUnderline = true; - w15.Add (w18); - w14.Add (w15); - this.btDel.Add (w14); - this.hbox3.Add (this.btDel); - global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btDel])); - w22.Position = 1; - w22.Expand = false; - w22.Fill = false; + this.btDel.Label = "Supprimer"; + global::Gtk.Image w7 = new global::Gtk.Image(); + w7.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-remove", global::Gtk.IconSize.Menu); + this.btDel.Image = w7; + this.hbox3.Add(this.btDel); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btDel])); + w8.Position = 1; + w8.Expand = false; + w8.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.btReset = new global::Gtk.Button (); + this.btReset = new global::Gtk.Button(); this.btReset.CanFocus = true; this.btReset.Name = "btReset"; this.btReset.UseUnderline = true; - // Container child btReset.Gtk.Container+ContainerChild - global::Gtk.Alignment w23 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w24 = new global::Gtk.HBox (); - w24.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w25 = new global::Gtk.Image (); - w25.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-clear", global::Gtk.IconSize.Menu); - w24.Add (w25); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w27 = new global::Gtk.Label (); - w27.LabelProp = "Réinitialiser"; - w27.UseUnderline = true; - w24.Add (w27); - w23.Add (w24); - this.btReset.Add (w23); - this.hbox3.Add (this.btReset); - global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btReset])); - w31.PackType = ((global::Gtk.PackType)(1)); - w31.Position = 3; - w31.Expand = false; - w31.Fill = false; + this.btReset.Label = "Réinitialiser"; + global::Gtk.Image w9 = new global::Gtk.Image(); + w9.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-clear", global::Gtk.IconSize.Menu); + this.btReset.Image = w9; + this.hbox3.Add(this.btReset); + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btReset])); + w10.PackType = ((global::Gtk.PackType)(1)); + w10.Position = 3; + w10.Expand = false; + w10.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.btPatchDroit = new global::Gtk.Button (); + this.btPatchDroit = new global::Gtk.Button(); this.btPatchDroit.CanFocus = true; this.btPatchDroit.Name = "btPatchDroit"; this.btPatchDroit.UseUnderline = true; - // Container child btPatchDroit.Gtk.Container+ContainerChild - global::Gtk.Alignment w32 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w33 = new global::Gtk.HBox (); - w33.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w34 = new global::Gtk.Image (); - w34.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-sort-ascending", global::Gtk.IconSize.Menu); - w33.Add (w34); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w36 = new global::Gtk.Label (); - w36.LabelProp = "Patch Droit"; - w36.UseUnderline = true; - w33.Add (w36); - w32.Add (w33); - this.btPatchDroit.Add (w32); - this.hbox3.Add (this.btPatchDroit); - global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btPatchDroit])); - w40.PackType = ((global::Gtk.PackType)(1)); - w40.Position = 4; - w40.Expand = false; - w40.Fill = false; - this.hbox2.Add (this.hbox3); - global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.hbox3])); - w41.Position = 2; - w2.Add (this.hbox2); - global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(w2 [this.hbox2])); - w42.Position = 0; - w42.Expand = false; - w42.Fill = false; + this.btPatchDroit.Label = "Patch Droit"; + global::Gtk.Image w11 = new global::Gtk.Image(); + w11.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-sort-ascending", global::Gtk.IconSize.Menu); + this.btPatchDroit.Image = w11; + this.hbox3.Add(this.btPatchDroit); + global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btPatchDroit])); + w12.PackType = ((global::Gtk.PackType)(1)); + w12.Position = 4; + w12.Expand = false; + w12.Fill = false; + this.hbox2.Add(this.hbox3); + global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.hbox3])); + w13.Position = 2; + w2.Add(this.hbox2); + global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(w2[this.hbox2])); + w14.Position = 0; + w14.Expand = false; + w14.Fill = false; // Container child dialog1_VBox.Gtk.Box+BoxChild - this.hseparator1 = new global::Gtk.HSeparator (); + this.hseparator1 = new global::Gtk.HSeparator(); this.hseparator1.HeightRequest = 24; this.hseparator1.Name = "hseparator1"; - w2.Add (this.hseparator1); - global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(w2 [this.hseparator1])); - w43.Position = 1; - w43.Expand = false; - w43.Fill = false; + w2.Add(this.hseparator1); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(w2[this.hseparator1])); + w15.Position = 1; + w15.Expand = false; + w15.Fill = false; // Container child dialog1_VBox.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox (); + this.hbox1 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.btAllume = new global::Gtk.ToggleButton (); + this.btAllume = new global::Gtk.ToggleButton(); this.btAllume.CanFocus = true; this.btAllume.Name = "btAllume"; this.btAllume.UseUnderline = true; - // Container child btAllume.Gtk.Container+ContainerChild - global::Gtk.Alignment w44 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w45 = new global::Gtk.HBox (); - w45.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w46 = new global::Gtk.Image (); - w46.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-find", global::Gtk.IconSize.Menu); - w45.Add (w46); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w48 = new global::Gtk.Label (); - w48.LabelProp = "Allumer !"; - w48.UseUnderline = true; - w45.Add (w48); - w44.Add (w45); - this.btAllume.Add (w44); - this.hbox1.Add (this.btAllume); - global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btAllume])); - w52.Position = 0; - w52.Expand = false; - w52.Fill = false; + this.btAllume.Label = "Allumer !"; + global::Gtk.Image w16 = new global::Gtk.Image(); + w16.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-find", global::Gtk.IconSize.Menu); + this.btAllume.Image = w16; + this.hbox1.Add(this.btAllume); + global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btAllume])); + w17.Position = 0; + w17.Expand = false; + w17.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.spinDimmer = new global::Gtk.SpinButton (1, 512, 1); + this.spinDimmer = new global::Gtk.SpinButton(1D, 512D, 1D); this.spinDimmer.CanFocus = true; this.spinDimmer.Name = "spinDimmer"; - this.spinDimmer.Adjustment.PageIncrement = 10; - this.spinDimmer.ClimbRate = 1; + this.spinDimmer.Adjustment.PageIncrement = 10D; + this.spinDimmer.ClimbRate = 1D; this.spinDimmer.Numeric = true; - this.spinDimmer.Value = 1; - this.hbox1.Add (this.spinDimmer); - global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.spinDimmer])); - w53.Position = 1; - w53.Expand = false; - w53.Fill = false; + this.spinDimmer.Value = 1D; + this.hbox1.Add(this.spinDimmer); + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.spinDimmer])); + w18.Position = 1; + w18.Expand = false; + w18.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.label6 = new global::Gtk.Label (); + this.label6 = new global::Gtk.Label(); this.label6.Name = "label6"; this.label6.LabelProp = "Circuit :"; - this.hbox1.Add (this.label6); - global::Gtk.Box.BoxChild w54 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label6])); - w54.Position = 2; - w54.Expand = false; - w54.Fill = false; + this.hbox1.Add(this.label6); + global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.label6])); + w19.Position = 2; + w19.Expand = false; + w19.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.cbCircuit = global::Gtk.ComboBox.NewText (); + this.cbCircuit = global::Gtk.ComboBox.NewText(); this.cbCircuit.Name = "cbCircuit"; - this.hbox1.Add (this.cbCircuit); - global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.cbCircuit])); - w55.Position = 3; - w55.Expand = false; - w55.Fill = false; + this.hbox1.Add(this.cbCircuit); + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.cbCircuit])); + w20.Position = 3; + w20.Expand = false; + w20.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.cbFT = global::Gtk.ComboBox.NewText (); + this.cbFT = global::Gtk.ComboBox.NewText(); this.cbFT.Name = "cbFT"; - this.hbox1.Add (this.cbFT); - global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.cbFT])); - w56.Position = 4; - w56.Expand = false; - w56.Fill = false; + this.hbox1.Add(this.cbFT); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.cbFT])); + w21.Position = 4; + w21.Expand = false; + w21.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.lbParam1 = new global::Gtk.Label (); + this.lbParam1 = new global::Gtk.Label(); this.lbParam1.Name = "lbParam1"; this.lbParam1.LabelProp = "param 1"; - this.hbox1.Add (this.lbParam1); - global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.lbParam1])); - w57.Position = 5; - w57.Expand = false; - w57.Fill = false; + this.hbox1.Add(this.lbParam1); + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.lbParam1])); + w22.Position = 5; + w22.Expand = false; + w22.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.txtParam1 = new global::Gtk.Entry (); + this.txtParam1 = new global::Gtk.Entry(); this.txtParam1.CanFocus = true; this.txtParam1.Name = "txtParam1"; this.txtParam1.IsEditable = true; this.txtParam1.InvisibleChar = '•'; - this.hbox1.Add (this.txtParam1); - global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.txtParam1])); - w58.Position = 6; + this.hbox1.Add(this.txtParam1); + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.txtParam1])); + w23.Position = 6; // Container child hbox1.Gtk.Box+BoxChild - this.lbParam2 = new global::Gtk.Label (); + this.lbParam2 = new global::Gtk.Label(); this.lbParam2.Name = "lbParam2"; this.lbParam2.LabelProp = "param2"; - this.hbox1.Add (this.lbParam2); - global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.lbParam2])); - w59.Position = 7; - w59.Expand = false; - w59.Fill = false; + this.hbox1.Add(this.lbParam2); + global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.lbParam2])); + w24.Position = 7; + w24.Expand = false; + w24.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.txtParam2 = new global::Gtk.Entry (); + this.txtParam2 = new global::Gtk.Entry(); this.txtParam2.CanFocus = true; this.txtParam2.Name = "txtParam2"; this.txtParam2.IsEditable = true; this.txtParam2.InvisibleChar = '•'; - this.hbox1.Add (this.txtParam2); - global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.txtParam2])); - w60.Position = 8; - w2.Add (this.hbox1); - global::Gtk.Box.BoxChild w61 = ((global::Gtk.Box.BoxChild)(w2 [this.hbox1])); - w61.Position = 2; - w61.Expand = false; - w61.Fill = false; + this.hbox1.Add(this.txtParam2); + global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.txtParam2])); + w25.Position = 8; + w2.Add(this.hbox1); + global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(w2[this.hbox1])); + w26.Position = 2; + w26.Expand = false; + w26.Fill = false; // Container child dialog1_VBox.Gtk.Box+BoxChild - this.notebook1 = new global::Gtk.Notebook (); + this.notebook1 = new global::Gtk.Notebook(); this.notebook1.CanFocus = true; this.notebook1.Name = "notebook1"; this.notebook1.CurrentPage = 0; // Container child notebook1.Gtk.Notebook+NotebookChild - this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - this.tvDimm = new global::Gtk.TreeView (); + this.tvDimm = new global::Gtk.TreeView(); this.tvDimm.CanFocus = true; this.tvDimm.Name = "tvDimm"; - this.GtkScrolledWindow.Add (this.tvDimm); - this.notebook1.Add (this.GtkScrolledWindow); + this.GtkScrolledWindow.Add(this.tvDimm); + this.notebook1.Add(this.GtkScrolledWindow); // Notebook tab - this.label2 = new global::Gtk.Label (); + this.label2 = new global::Gtk.Label(); this.label2.Name = "label2"; this.label2.LabelProp = "Patch"; - this.notebook1.SetTabLabel (this.GtkScrolledWindow, this.label2); - this.label2.ShowAll (); + this.notebook1.SetTabLabel(this.GtkScrolledWindow, this.label2); + this.label2.ShowAll(); // Container child notebook1.Gtk.Notebook+NotebookChild - this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow1.Name = "GtkScrolledWindow1"; this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild - this.tvCircuits = new global::Gtk.TreeView (); + this.tvCircuits = new global::Gtk.TreeView(); this.tvCircuits.CanFocus = true; this.tvCircuits.Name = "tvCircuits"; - this.GtkScrolledWindow1.Add (this.tvCircuits); - this.notebook1.Add (this.GtkScrolledWindow1); - global::Gtk.Notebook.NotebookChild w65 = ((global::Gtk.Notebook.NotebookChild)(this.notebook1 [this.GtkScrolledWindow1])); - w65.Position = 1; + this.GtkScrolledWindow1.Add(this.tvCircuits); + this.notebook1.Add(this.GtkScrolledWindow1); + global::Gtk.Notebook.NotebookChild w30 = ((global::Gtk.Notebook.NotebookChild)(this.notebook1[this.GtkScrolledWindow1])); + w30.Position = 1; // Notebook tab - this.label5 = new global::Gtk.Label (); + this.label5 = new global::Gtk.Label(); this.label5.Name = "label5"; this.label5.LabelProp = "Patch Rapide"; - this.notebook1.SetTabLabel (this.GtkScrolledWindow1, this.label5); - this.label5.ShowAll (); - w2.Add (this.notebook1); - global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(w2 [this.notebook1])); - w66.Position = 3; + this.notebook1.SetTabLabel(this.GtkScrolledWindow1, this.label5); + this.label5.ShowAll(); + w2.Add(this.notebook1); + global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(w2[this.notebook1])); + w31.Position = 3; // Internal child DMX2.EditionUnivers.ActionArea - global::Gtk.HButtonBox w67 = this.ActionArea; - w67.Name = "dialog1_ActionArea"; - w67.Spacing = 10; - w67.BorderWidth = ((uint)(5)); - w67.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + global::Gtk.HButtonBox w32 = this.ActionArea; + w32.Name = "dialog1_ActionArea"; + w32.Spacing = 10; + w32.BorderWidth = ((uint)(5)); + w32.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonCancel = new global::Gtk.Button (); + this.buttonCancel = new global::Gtk.Button(); this.buttonCancel.CanDefault = true; this.buttonCancel.CanFocus = true; this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.UseStock = true; this.buttonCancel.UseUnderline = true; this.buttonCancel.Label = "gtk-close"; - this.AddActionWidget (this.buttonCancel, -7); - global::Gtk.ButtonBox.ButtonBoxChild w68 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w67 [this.buttonCancel])); - w68.Expand = false; - w68.Fill = false; - if ((this.Child != null)) { - this.Child.ShowAll (); + this.AddActionWidget(this.buttonCancel, -7); + global::Gtk.ButtonBox.ButtonBoxChild w33 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w32[this.buttonCancel])); + w33.Expand = false; + w33.Fill = false; + if ((this.Child != null)) + { + this.Child.ShowAll(); } this.DefaultWidth = 771; this.DefaultHeight = 483; - this.Show (); - this.cbUnivers.Changed += new global::System.EventHandler (this.OnCbUniversChanged); - this.btAdd.Clicked += new global::System.EventHandler (this.OnBtAddClicked); - this.btPatchDroit.Clicked += new global::System.EventHandler (this.OnBtPatchDroitClicked); - this.btReset.Clicked += new global::System.EventHandler (this.OnBtResetClicked); - this.btAllume.Clicked += new global::System.EventHandler (this.OnBtAllumeClicked); - this.spinDimmer.ValueChanged += new global::System.EventHandler (this.OnSpinDimmerValueChanged); - this.cbCircuit.Changed += new global::System.EventHandler (this.OnCbCircuitChanged); - this.cbFT.Changed += new global::System.EventHandler (this.OnCbFTChanged); - this.txtParam1.Changed += new global::System.EventHandler (this.OnTxtParam1Changed); - this.txtParam2.Changed += new global::System.EventHandler (this.OnTxtParam2Changed); - this.tvDimm.CursorChanged += new global::System.EventHandler (this.OnTvDimmCursorChanged); - this.buttonCancel.Clicked += new global::System.EventHandler (this.OnButtonCancelClicked); + this.Show(); + this.cbUnivers.Changed += new global::System.EventHandler(this.OnCbUniversChanged); + this.btAdd.Clicked += new global::System.EventHandler(this.OnBtAddClicked); + this.btPatchDroit.Clicked += new global::System.EventHandler(this.OnBtPatchDroitClicked); + this.btReset.Clicked += new global::System.EventHandler(this.OnBtResetClicked); + this.btAllume.Clicked += new global::System.EventHandler(this.OnBtAllumeClicked); + this.spinDimmer.ValueChanged += new global::System.EventHandler(this.OnSpinDimmerValueChanged); + this.cbCircuit.Changed += new global::System.EventHandler(this.OnCbCircuitChanged); + this.cbFT.Changed += new global::System.EventHandler(this.OnCbFTChanged); + this.txtParam1.Changed += new global::System.EventHandler(this.OnTxtParam1Changed); + this.txtParam2.Changed += new global::System.EventHandler(this.OnTxtParam2Changed); + this.tvDimm.CursorChanged += new global::System.EventHandler(this.OnTvDimmCursorChanged); + this.buttonCancel.Clicked += new global::System.EventHandler(this.OnButtonCancelClicked); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.GestionCircuits.cs b/DMX-2.0/gtk-gui/DMX2.GestionCircuits.cs index 0537343..f1a0b5f 100644 --- a/DMX-2.0/gtk-gui/DMX2.GestionCircuits.cs +++ b/DMX-2.0/gtk-gui/DMX2.GestionCircuits.cs @@ -5,23 +5,29 @@ namespace DMX2 public partial class GestionCircuits { private global::Gtk.UIManager UIManager; + private global::Gtk.Action addAction; + private global::Gtk.VBox vbox2; + private global::Gtk.Toolbar toolbar1; + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView listeCircuits; + private global::Gtk.Button buttonOk; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.GestionCircuits - this.UIManager = new global::Gtk.UIManager (); - global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default"); - this.addAction = new global::Gtk.Action ("addAction", null, null, "gtk-add"); - w1.Add (this.addAction, null); - this.UIManager.InsertActionGroup (w1, 0); - this.AddAccelGroup (this.UIManager.AccelGroup); + this.UIManager = new global::Gtk.UIManager(); + global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default"); + this.addAction = new global::Gtk.Action("addAction", null, null, "gtk-add"); + w1.Add(this.addAction, null); + this.UIManager.InsertActionGroup(w1, 0); + this.AddAccelGroup(this.UIManager.AccelGroup); this.Name = "DMX2.GestionCircuits"; this.Title = "Circuits"; this.TypeHint = ((global::Gdk.WindowTypeHint)(1)); @@ -33,63 +39,65 @@ namespace DMX2 w2.Name = "dialog1_VBox"; w2.BorderWidth = ((uint)(2)); // Container child dialog1_VBox.Gtk.Box+BoxChild - this.vbox2 = new global::Gtk.VBox (); + this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); - this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar1"))); + this.UIManager.AddUiFromString(""); + this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar1"))); this.toolbar1.Name = "toolbar1"; this.toolbar1.ShowArrow = false; - this.vbox2.Add (this.toolbar1); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.toolbar1])); + this.vbox2.Add(this.toolbar1); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.toolbar1])); w3.Position = 0; w3.Expand = false; w3.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - this.listeCircuits = new global::Gtk.TreeView (); + this.listeCircuits = new global::Gtk.TreeView(); this.listeCircuits.CanFocus = true; this.listeCircuits.Name = "listeCircuits"; this.listeCircuits.EnableSearch = false; this.listeCircuits.Reorderable = true; - this.GtkScrolledWindow.Add (this.listeCircuits); - this.vbox2.Add (this.GtkScrolledWindow); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow])); + this.GtkScrolledWindow.Add(this.listeCircuits); + this.vbox2.Add(this.GtkScrolledWindow); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow])); w5.Position = 1; - w2.Add (this.vbox2); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w2 [this.vbox2])); + w2.Add(this.vbox2); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w2[this.vbox2])); w6.Position = 0; // Internal child DMX2.GestionCircuits.ActionArea global::Gtk.HButtonBox w7 = this.ActionArea; - w7.Name = "dialog1_ActionArea"; + w7.Name = "dialog_ActionArea"; w7.Spacing = 10; w7.BorderWidth = ((uint)(5)); w7.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); - // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonOk = new global::Gtk.Button (); + // Container child dialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.buttonOk = new global::Gtk.Button(); this.buttonOk.CanDefault = true; this.buttonOk.CanFocus = true; this.buttonOk.Name = "buttonOk"; this.buttonOk.UseStock = true; this.buttonOk.UseUnderline = true; this.buttonOk.Label = "gtk-close"; - this.AddActionWidget (this.buttonOk, -7); - global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7 [this.buttonOk])); + this.AddActionWidget(this.buttonOk, -7); + global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7[this.buttonOk])); w8.Expand = false; w8.Fill = false; - if ((this.Child != null)) { - this.Child.ShowAll (); + if ((this.Child != null)) + { + this.Child.ShowAll(); } this.DefaultWidth = 400; this.DefaultHeight = 456; this.buttonOk.HasDefault = true; - this.Hide (); - this.Response += new global::Gtk.ResponseHandler (this.OnResp); - this.addAction.Activated += new global::System.EventHandler (this.OnAddActionActivated); + this.Hide(); + this.Response += new global::Gtk.ResponseHandler(this.OnResp); + this.addAction.Activated += new global::System.EventHandler(this.OnAddActionActivated); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs b/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs index 5110119..b78cd77 100644 --- a/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs +++ b/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs @@ -5,19 +5,28 @@ namespace DMX2 public partial class GestionDriversUI { private global::Gtk.VBox vbox2; + private global::Gtk.TreeView listeUsb; + private global::Gtk.HBox hbox1; + private global::Gtk.ComboBox comboDriver; + private global::Gtk.Button btnDisconnect; + private global::Gtk.Button btnConnect; + private global::Gtk.Frame frmDrvUI; + private global::Gtk.Alignment frmDrvChild; + private global::Gtk.Label GtkLabel2; + private global::Gtk.Button buttonOk; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.GestionDriversUI this.Name = "DMX2.GestionDriversUI"; this.WindowPosition = ((global::Gtk.WindowPosition)(4)); @@ -26,81 +35,81 @@ namespace DMX2 w1.Name = "dialog1_VBox"; w1.BorderWidth = ((uint)(2)); // Container child dialog1_VBox.Gtk.Box+BoxChild - this.vbox2 = new global::Gtk.VBox (); + this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild - this.listeUsb = new global::Gtk.TreeView (); + this.listeUsb = new global::Gtk.TreeView(); this.listeUsb.HeightRequest = 87; this.listeUsb.CanFocus = true; this.listeUsb.Name = "listeUsb"; - this.vbox2.Add (this.listeUsb); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.listeUsb])); + this.vbox2.Add(this.listeUsb); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.listeUsb])); w2.Position = 0; w2.Expand = false; // Container child vbox2.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox (); + this.hbox1 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.comboDriver = global::Gtk.ComboBox.NewText (); + this.comboDriver = global::Gtk.ComboBox.NewText(); this.comboDriver.Sensitive = false; this.comboDriver.Name = "comboDriver"; - this.hbox1.Add (this.comboDriver); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.comboDriver])); + this.hbox1.Add(this.comboDriver); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.comboDriver])); w3.Position = 0; // Container child hbox1.Gtk.Box+BoxChild - this.btnDisconnect = new global::Gtk.Button (); + this.btnDisconnect = new global::Gtk.Button(); this.btnDisconnect.Sensitive = false; this.btnDisconnect.CanFocus = true; this.btnDisconnect.Name = "btnDisconnect"; this.btnDisconnect.UseStock = true; this.btnDisconnect.UseUnderline = true; this.btnDisconnect.Label = "gtk-disconnect"; - this.hbox1.Add (this.btnDisconnect); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btnDisconnect])); + this.hbox1.Add(this.btnDisconnect); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnDisconnect])); w4.PackType = ((global::Gtk.PackType)(1)); w4.Position = 1; w4.Expand = false; w4.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.btnConnect = new global::Gtk.Button (); + this.btnConnect = new global::Gtk.Button(); this.btnConnect.Sensitive = false; this.btnConnect.CanFocus = true; this.btnConnect.Name = "btnConnect"; this.btnConnect.UseStock = true; this.btnConnect.UseUnderline = true; this.btnConnect.Label = "gtk-connect"; - this.hbox1.Add (this.btnConnect); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btnConnect])); + this.hbox1.Add(this.btnConnect); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.btnConnect])); w5.PackType = ((global::Gtk.PackType)(1)); w5.Position = 2; w5.Expand = false; w5.Fill = false; - this.vbox2.Add (this.hbox1); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1])); + this.vbox2.Add(this.hbox1); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); w6.Position = 1; w6.Expand = false; w6.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.frmDrvUI = new global::Gtk.Frame (); + this.frmDrvUI = new global::Gtk.Frame(); this.frmDrvUI.HeightRequest = 200; this.frmDrvUI.Name = "frmDrvUI"; this.frmDrvUI.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child frmDrvUI.Gtk.Container+ContainerChild - this.frmDrvChild = new global::Gtk.Alignment (0F, 0F, 1F, 1F); + this.frmDrvChild = new global::Gtk.Alignment(0F, 0F, 1F, 1F); this.frmDrvChild.Name = "frmDrvChild"; this.frmDrvChild.LeftPadding = ((uint)(12)); - this.frmDrvUI.Add (this.frmDrvChild); - this.GtkLabel2 = new global::Gtk.Label (); + this.frmDrvUI.Add(this.frmDrvChild); + this.GtkLabel2 = new global::Gtk.Label(); this.GtkLabel2.Name = "GtkLabel2"; this.GtkLabel2.UseMarkup = true; this.frmDrvUI.LabelWidget = this.GtkLabel2; - this.vbox2.Add (this.frmDrvUI); - global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.frmDrvUI])); + this.vbox2.Add(this.frmDrvUI); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.frmDrvUI])); w8.Position = 2; - w1.Add (this.vbox2); - global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2])); + w1.Add(this.vbox2); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(w1[this.vbox2])); w9.Position = 0; // Internal child DMX2.GestionDriversUI.ActionArea global::Gtk.HButtonBox w10 = this.ActionArea; @@ -109,27 +118,28 @@ namespace DMX2 w10.BorderWidth = ((uint)(5)); w10.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonOk = new global::Gtk.Button (); + this.buttonOk = new global::Gtk.Button(); this.buttonOk.CanDefault = true; this.buttonOk.CanFocus = true; this.buttonOk.Name = "buttonOk"; this.buttonOk.UseStock = true; this.buttonOk.UseUnderline = true; this.buttonOk.Label = "gtk-close"; - this.AddActionWidget (this.buttonOk, -7); - global::Gtk.ButtonBox.ButtonBoxChild w11 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10 [this.buttonOk])); + this.AddActionWidget(this.buttonOk, -7); + global::Gtk.ButtonBox.ButtonBoxChild w11 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonOk])); w11.Expand = false; w11.Fill = false; - if ((this.Child != null)) { - this.Child.ShowAll (); + if ((this.Child != null)) + { + this.Child.ShowAll(); } this.DefaultWidth = 488; this.DefaultHeight = 420; - this.Show (); - this.listeUsb.CursorChanged += new global::System.EventHandler (this.OnListeUsbCursorChanged); - this.btnConnect.Clicked += new global::System.EventHandler (this.OnBtnConnectClicked); - this.btnDisconnect.Clicked += new global::System.EventHandler (this.OnBtnDisConnectClicked); - this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked); + this.Show(); + this.listeUsb.CursorChanged += new global::System.EventHandler(this.OnListeUsbCursorChanged); + this.btnConnect.Clicked += new global::System.EventHandler(this.OnBtnConnectClicked); + this.btnDisconnect.Clicked += new global::System.EventHandler(this.OnBtnDisConnectClicked); + this.buttonOk.Clicked += new global::System.EventHandler(this.OnButtonOkClicked); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs b/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs index c67b852..9c3159f 100644 --- a/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs +++ b/DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs @@ -5,43 +5,76 @@ namespace DMX2 public partial class GestionMidiUI { private global::Gtk.Table table1; + private global::Gtk.Frame frame2; + private global::Gtk.Alignment GtkAlignment3; + private global::Gtk.Table table2; + private global::Gtk.CheckButton chkFourteenBits; + private global::Gtk.CheckButton chkPg; + private global::Gtk.Label label3; + private global::Gtk.Label label4; + private global::Gtk.Label label5; + private global::Gtk.Label label6; + private global::Gtk.SpinButton spinMax14b; + private global::Gtk.SpinButton spinNbPage; + private global::Gtk.SpinButton spinPageDown; + private global::Gtk.SpinButton spinPageUp; + private global::Gtk.SpinButton spinUPCh; - private global::Gtk.Label GtkLabel6; + + private global::Gtk.Label GtkLabelT; + private global::Gtk.Frame frame3; + private global::Gtk.Alignment GtkAlignment2; + private global::Gtk.VBox vbox5; + private global::Gtk.CheckButton chkFB; + private global::Gtk.Label GtkLabel3; + private global::Gtk.HButtonBox hbuttonbox2; + private global::Gtk.Button btnActiv; + private global::Gtk.Button btnDesactiv; + private global::Gtk.VBox vbox2; + private global::Gtk.Label label1; + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView listDetect; + private global::Gtk.VBox vbox3; + private global::Gtk.Label label2; + private global::Gtk.ScrolledWindow GtkScrolledWindow1; + private global::Gtk.TreeView listKnown; + private global::Gtk.Button btnClearEvents; + private global::Gtk.Button buttonClose; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.GestionMidiUI this.Name = "DMX2.GestionMidiUI"; this.Title = "Connexions Midi"; @@ -51,102 +84,102 @@ namespace DMX2 w1.Name = "dialog1_VBox"; w1.BorderWidth = ((uint)(2)); // Container child dialog1_VBox.Gtk.Box+BoxChild - this.table1 = new global::Gtk.Table (((uint)(3)), ((uint)(2)), false); + this.table1 = new global::Gtk.Table(((uint)(3)), ((uint)(2)), false); this.table1.Name = "table1"; this.table1.RowSpacing = ((uint)(6)); this.table1.ColumnSpacing = ((uint)(6)); // Container child table1.Gtk.Table+TableChild - this.frame2 = new global::Gtk.Frame (); + this.frame2 = new global::Gtk.Frame(); this.frame2.Name = "frame2"; this.frame2.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child frame2.Gtk.Container+ContainerChild - this.GtkAlignment3 = new global::Gtk.Alignment (0F, 0F, 1F, 1F); + this.GtkAlignment3 = new global::Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment3.Name = "GtkAlignment3"; this.GtkAlignment3.LeftPadding = ((uint)(12)); // Container child GtkAlignment3.Gtk.Container+ContainerChild - this.table2 = new global::Gtk.Table (((uint)(6)), ((uint)(2)), false); + this.table2 = new global::Gtk.Table(((uint)(6)), ((uint)(2)), false); this.table2.Name = "table2"; this.table2.RowSpacing = ((uint)(6)); this.table2.ColumnSpacing = ((uint)(6)); // Container child table2.Gtk.Table+TableChild - this.chkFourteenBits = new global::Gtk.CheckButton (); + this.chkFourteenBits = new global::Gtk.CheckButton(); this.chkFourteenBits.CanFocus = true; this.chkFourteenBits.Name = "chkFourteenBits"; this.chkFourteenBits.Label = "Mode 14bits (CC 1 à 32)"; this.chkFourteenBits.DrawIndicator = true; this.chkFourteenBits.UseUnderline = true; - this.table2.Add (this.chkFourteenBits); - global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table2 [this.chkFourteenBits])); + this.table2.Add(this.chkFourteenBits); + global::Gtk.Table.TableChild w2 = ((global::Gtk.Table.TableChild)(this.table2[this.chkFourteenBits])); w2.TopAttach = ((uint)(4)); w2.BottomAttach = ((uint)(5)); w2.XOptions = ((global::Gtk.AttachOptions)(4)); w2.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.chkPg = new global::Gtk.CheckButton (); + this.chkPg = new global::Gtk.CheckButton(); this.chkPg.CanFocus = true; this.chkPg.Name = "chkPg"; this.chkPg.Label = "ne pas paginer ce canal :"; this.chkPg.DrawIndicator = true; this.chkPg.UseUnderline = true; - this.table2.Add (this.chkPg); - global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table2 [this.chkPg])); + this.table2.Add(this.chkPg); + global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table2[this.chkPg])); w3.TopAttach = ((uint)(1)); w3.BottomAttach = ((uint)(2)); w3.XOptions = ((global::Gtk.AttachOptions)(4)); w3.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.label3 = new global::Gtk.Label (); + this.label3 = new global::Gtk.Label(); this.label3.Name = "label3"; this.label3.Xalign = 0F; this.label3.LabelProp = "Nombre de pages"; - this.table2.Add (this.label3); - global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table2 [this.label3])); + this.table2.Add(this.label3); + global::Gtk.Table.TableChild w4 = ((global::Gtk.Table.TableChild)(this.table2[this.label3])); w4.XOptions = ((global::Gtk.AttachOptions)(4)); w4.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.label4 = new global::Gtk.Label (); + this.label4 = new global::Gtk.Label(); this.label4.Name = "label4"; this.label4.Xalign = 0F; this.label4.LabelProp = "CC page suivante :"; - this.table2.Add (this.label4); - global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table2 [this.label4])); + this.table2.Add(this.label4); + global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table2[this.label4])); w5.TopAttach = ((uint)(2)); w5.BottomAttach = ((uint)(3)); w5.XOptions = ((global::Gtk.AttachOptions)(4)); w5.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.label5 = new global::Gtk.Label (); + this.label5 = new global::Gtk.Label(); this.label5.Name = "label5"; this.label5.Xalign = 0F; this.label5.LabelProp = "CC page précédente :"; - this.table2.Add (this.label5); - global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table2 [this.label5])); + this.table2.Add(this.label5); + global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table2[this.label5])); w6.TopAttach = ((uint)(3)); w6.BottomAttach = ((uint)(4)); w6.XOptions = ((global::Gtk.AttachOptions)(4)); w6.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.label6 = new global::Gtk.Label (); + this.label6 = new global::Gtk.Label(); this.label6.Name = "label6"; this.label6.Xpad = 20; this.label6.Xalign = 0F; this.label6.LabelProp = "Valeur entrée max :"; - this.table2.Add (this.label6); - global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table2 [this.label6])); + this.table2.Add(this.label6); + global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table2[this.label6])); w7.TopAttach = ((uint)(5)); w7.BottomAttach = ((uint)(6)); w7.XOptions = ((global::Gtk.AttachOptions)(4)); w7.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.spinMax14b = new global::Gtk.SpinButton (1, 16383, 1); + this.spinMax14b = new global::Gtk.SpinButton(1D, 16383D, 1D); this.spinMax14b.CanFocus = true; this.spinMax14b.Name = "spinMax14b"; - this.spinMax14b.Adjustment.PageIncrement = 10; - this.spinMax14b.ClimbRate = 1; + this.spinMax14b.Adjustment.PageIncrement = 10D; + this.spinMax14b.ClimbRate = 1D; this.spinMax14b.Numeric = true; - this.spinMax14b.Value = 127; - this.table2.Add (this.spinMax14b); - global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table2 [this.spinMax14b])); + this.spinMax14b.Value = 127D; + this.table2.Add(this.spinMax14b); + global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table2[this.spinMax14b])); w8.TopAttach = ((uint)(5)); w8.BottomAttach = ((uint)(6)); w8.LeftAttach = ((uint)(1)); @@ -154,29 +187,29 @@ namespace DMX2 w8.XOptions = ((global::Gtk.AttachOptions)(4)); w8.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.spinNbPage = new global::Gtk.SpinButton (1, 99, 1); + this.spinNbPage = new global::Gtk.SpinButton(1D, 99D, 1D); this.spinNbPage.CanFocus = true; this.spinNbPage.Name = "spinNbPage"; - this.spinNbPage.Adjustment.PageIncrement = 10; - this.spinNbPage.ClimbRate = 1; + this.spinNbPage.Adjustment.PageIncrement = 10D; + this.spinNbPage.ClimbRate = 1D; this.spinNbPage.Numeric = true; - this.spinNbPage.Value = 8; - this.table2.Add (this.spinNbPage); - global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table2 [this.spinNbPage])); + this.spinNbPage.Value = 8D; + this.table2.Add(this.spinNbPage); + global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table2[this.spinNbPage])); w9.LeftAttach = ((uint)(1)); w9.RightAttach = ((uint)(2)); w9.XOptions = ((global::Gtk.AttachOptions)(4)); w9.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.spinPageDown = new global::Gtk.SpinButton (1, 127, 1); + this.spinPageDown = new global::Gtk.SpinButton(1D, 127D, 1D); this.spinPageDown.CanFocus = true; this.spinPageDown.Name = "spinPageDown"; - this.spinPageDown.Adjustment.PageIncrement = 10; - this.spinPageDown.ClimbRate = 1; + this.spinPageDown.Adjustment.PageIncrement = 10D; + this.spinPageDown.ClimbRate = 1D; this.spinPageDown.Numeric = true; - this.spinPageDown.Value = 126; - this.table2.Add (this.spinPageDown); - global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table2 [this.spinPageDown])); + this.spinPageDown.Value = 126D; + this.table2.Add(this.spinPageDown); + global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table2[this.spinPageDown])); w10.TopAttach = ((uint)(3)); w10.BottomAttach = ((uint)(4)); w10.LeftAttach = ((uint)(1)); @@ -184,15 +217,15 @@ namespace DMX2 w10.XOptions = ((global::Gtk.AttachOptions)(4)); w10.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.spinPageUp = new global::Gtk.SpinButton (1, 127, 1); + this.spinPageUp = new global::Gtk.SpinButton(1D, 127D, 1D); this.spinPageUp.CanFocus = true; this.spinPageUp.Name = "spinPageUp"; - this.spinPageUp.Adjustment.PageIncrement = 10; - this.spinPageUp.ClimbRate = 1; + this.spinPageUp.Adjustment.PageIncrement = 10D; + this.spinPageUp.ClimbRate = 1D; this.spinPageUp.Numeric = true; - this.spinPageUp.Value = 127; - this.table2.Add (this.spinPageUp); - global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table2 [this.spinPageUp])); + this.spinPageUp.Value = 127D; + this.table2.Add(this.spinPageUp); + global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table2[this.spinPageUp])); w11.TopAttach = ((uint)(2)); w11.BottomAttach = ((uint)(3)); w11.LeftAttach = ((uint)(1)); @@ -200,249 +233,226 @@ namespace DMX2 w11.XOptions = ((global::Gtk.AttachOptions)(4)); w11.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table2.Gtk.Table+TableChild - this.spinUPCh = new global::Gtk.SpinButton (1, 16, 1); + this.spinUPCh = new global::Gtk.SpinButton(1D, 16D, 1D); this.spinUPCh.CanFocus = true; this.spinUPCh.Name = "spinUPCh"; - this.spinUPCh.Adjustment.PageIncrement = 1; - this.spinUPCh.ClimbRate = 1; + this.spinUPCh.Adjustment.PageIncrement = 1D; + this.spinUPCh.ClimbRate = 1D; this.spinUPCh.Numeric = true; - this.spinUPCh.Value = 1; - this.table2.Add (this.spinUPCh); - global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table2 [this.spinUPCh])); + this.spinUPCh.Value = 1D; + this.table2.Add(this.spinUPCh); + global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table2[this.spinUPCh])); w12.TopAttach = ((uint)(1)); w12.BottomAttach = ((uint)(2)); w12.LeftAttach = ((uint)(1)); w12.RightAttach = ((uint)(2)); w12.XOptions = ((global::Gtk.AttachOptions)(4)); w12.YOptions = ((global::Gtk.AttachOptions)(4)); - this.GtkAlignment3.Add (this.table2); - this.frame2.Add (this.GtkAlignment3); - this.GtkLabel6 = new global::Gtk.Label (); - this.GtkLabel6.Name = "GtkLabel6"; - this.GtkLabel6.LabelProp = "Options Midi"; - this.GtkLabel6.UseMarkup = true; - this.frame2.LabelWidget = this.GtkLabel6; - this.table1.Add (this.frame2); - global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1 [this.frame2])); + this.GtkAlignment3.Add(this.table2); + this.frame2.Add(this.GtkAlignment3); + this.GtkLabelT = new global::Gtk.Label(); + this.GtkLabelT.Name = "GtkLabelT"; + this.GtkLabelT.LabelProp = "Options Midi"; + this.GtkLabelT.UseMarkup = true; + this.frame2.LabelWidget = this.GtkLabelT; + this.table1.Add(this.frame2); + global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.frame2])); w15.XOptions = ((global::Gtk.AttachOptions)(4)); w15.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.frame3 = new global::Gtk.Frame (); + this.frame3 = new global::Gtk.Frame(); this.frame3.Name = "frame3"; this.frame3.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child frame3.Gtk.Container+ContainerChild - this.GtkAlignment2 = new global::Gtk.Alignment (0F, 0F, 1F, 1F); + this.GtkAlignment2 = new global::Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment2.Name = "GtkAlignment2"; this.GtkAlignment2.LeftPadding = ((uint)(12)); // Container child GtkAlignment2.Gtk.Container+ContainerChild - this.vbox5 = new global::Gtk.VBox (); + this.vbox5 = new global::Gtk.VBox(); this.vbox5.Name = "vbox5"; this.vbox5.Spacing = 6; // Container child vbox5.Gtk.Box+BoxChild - this.chkFB = new global::Gtk.CheckButton (); + this.chkFB = new global::Gtk.CheckButton(); this.chkFB.Sensitive = false; this.chkFB.CanFocus = true; this.chkFB.Name = "chkFB"; this.chkFB.Label = "Feedback\n(interface motorisée)"; this.chkFB.DrawIndicator = true; this.chkFB.UseUnderline = true; - this.vbox5.Add (this.chkFB); - global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.chkFB])); + this.vbox5.Add(this.chkFB); + global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.chkFB])); w16.Position = 0; w16.Expand = false; w16.Fill = false; - this.GtkAlignment2.Add (this.vbox5); - this.frame3.Add (this.GtkAlignment2); - this.GtkLabel3 = new global::Gtk.Label (); + this.GtkAlignment2.Add(this.vbox5); + this.frame3.Add(this.GtkAlignment2); + this.GtkLabel3 = new global::Gtk.Label(); this.GtkLabel3.Name = "GtkLabel3"; - this.GtkLabel3.LabelProp = "Options de l'interface"; + this.GtkLabel3.LabelProp = "Options de l\'interface"; this.GtkLabel3.UseMarkup = true; this.frame3.LabelWidget = this.GtkLabel3; - this.table1.Add (this.frame3); - global::Gtk.Table.TableChild w19 = ((global::Gtk.Table.TableChild)(this.table1 [this.frame3])); + this.table1.Add(this.frame3); + global::Gtk.Table.TableChild w19 = ((global::Gtk.Table.TableChild)(this.table1[this.frame3])); w19.TopAttach = ((uint)(2)); w19.BottomAttach = ((uint)(3)); w19.XOptions = ((global::Gtk.AttachOptions)(4)); w19.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.hbuttonbox2 = new global::Gtk.HButtonBox (); + this.hbuttonbox2 = new global::Gtk.HButtonBox(); this.hbuttonbox2.Name = "hbuttonbox2"; // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild - this.btnActiv = new global::Gtk.Button (); + this.btnActiv = new global::Gtk.Button(); this.btnActiv.Sensitive = false; this.btnActiv.CanFocus = true; this.btnActiv.Name = "btnActiv"; this.btnActiv.UseUnderline = true; - // Container child btnActiv.Gtk.Container+ContainerChild - global::Gtk.Alignment w20 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w21 = new global::Gtk.HBox (); - w21.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w22 = new global::Gtk.Image (); - w22.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-down", global::Gtk.IconSize.Menu); - w21.Add (w22); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w24 = new global::Gtk.Label (); - w24.LabelProp = "Activer"; - w24.UseUnderline = true; - w21.Add (w24); - w20.Add (w21); - this.btnActiv.Add (w20); - this.hbuttonbox2.Add (this.btnActiv); - global::Gtk.ButtonBox.ButtonBoxChild w28 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.btnActiv])); - w28.Expand = false; - w28.Fill = false; + this.btnActiv.Label = "Activer"; + global::Gtk.Image w20 = new global::Gtk.Image(); + w20.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-go-down", global::Gtk.IconSize.Menu); + this.btnActiv.Image = w20; + this.hbuttonbox2.Add(this.btnActiv); + global::Gtk.ButtonBox.ButtonBoxChild w21 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.btnActiv])); + w21.Expand = false; + w21.Fill = false; // Container child hbuttonbox2.Gtk.ButtonBox+ButtonBoxChild - this.btnDesactiv = new global::Gtk.Button (); + this.btnDesactiv = new global::Gtk.Button(); this.btnDesactiv.Sensitive = false; this.btnDesactiv.CanFocus = true; this.btnDesactiv.Name = "btnDesactiv"; this.btnDesactiv.UseUnderline = true; - // Container child btnDesactiv.Gtk.Container+ContainerChild - global::Gtk.Alignment w29 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w30 = new global::Gtk.HBox (); - w30.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w31 = new global::Gtk.Image (); - w31.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-up", global::Gtk.IconSize.Menu); - w30.Add (w31); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w33 = new global::Gtk.Label (); - w33.LabelProp = "Désactiver"; - w33.UseUnderline = true; - w30.Add (w33); - w29.Add (w30); - this.btnDesactiv.Add (w29); - this.hbuttonbox2.Add (this.btnDesactiv); - global::Gtk.ButtonBox.ButtonBoxChild w37 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2 [this.btnDesactiv])); - w37.Position = 1; - w37.Expand = false; - w37.Fill = false; - this.table1.Add (this.hbuttonbox2); - global::Gtk.Table.TableChild w38 = ((global::Gtk.Table.TableChild)(this.table1 [this.hbuttonbox2])); - w38.TopAttach = ((uint)(1)); - w38.BottomAttach = ((uint)(2)); - w38.LeftAttach = ((uint)(1)); - w38.RightAttach = ((uint)(2)); - w38.XOptions = ((global::Gtk.AttachOptions)(0)); - w38.YOptions = ((global::Gtk.AttachOptions)(4)); + this.btnDesactiv.Label = "Désactiver"; + global::Gtk.Image w22 = new global::Gtk.Image(); + w22.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-go-up", global::Gtk.IconSize.Menu); + this.btnDesactiv.Image = w22; + this.hbuttonbox2.Add(this.btnDesactiv); + global::Gtk.ButtonBox.ButtonBoxChild w23 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox2[this.btnDesactiv])); + w23.Position = 1; + w23.Expand = false; + w23.Fill = false; + this.table1.Add(this.hbuttonbox2); + global::Gtk.Table.TableChild w24 = ((global::Gtk.Table.TableChild)(this.table1[this.hbuttonbox2])); + w24.TopAttach = ((uint)(1)); + w24.BottomAttach = ((uint)(2)); + w24.LeftAttach = ((uint)(1)); + w24.RightAttach = ((uint)(2)); + w24.XOptions = ((global::Gtk.AttachOptions)(0)); + w24.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child table1.Gtk.Table+TableChild - this.vbox2 = new global::Gtk.VBox (); + this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); + this.label1 = new global::Gtk.Label(); this.label1.Name = "label1"; this.label1.Xalign = 0F; this.label1.LabelProp = "Interfaces disponibles :"; - this.vbox2.Add (this.label1); - global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label1])); - w39.Position = 0; - w39.Expand = false; - w39.Fill = false; + this.vbox2.Add(this.label1); + global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.label1])); + w25.Position = 0; + w25.Expand = false; + w25.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - this.listDetect = new global::Gtk.TreeView (); + this.listDetect = new global::Gtk.TreeView(); this.listDetect.CanFocus = true; this.listDetect.Name = "listDetect"; this.listDetect.HeadersVisible = false; - this.GtkScrolledWindow.Add (this.listDetect); - this.vbox2.Add (this.GtkScrolledWindow); - global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow])); - w41.Position = 1; - this.table1.Add (this.vbox2); - global::Gtk.Table.TableChild w42 = ((global::Gtk.Table.TableChild)(this.table1 [this.vbox2])); - w42.LeftAttach = ((uint)(1)); - w42.RightAttach = ((uint)(2)); + this.GtkScrolledWindow.Add(this.listDetect); + this.vbox2.Add(this.GtkScrolledWindow); + global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow])); + w27.Position = 1; + this.table1.Add(this.vbox2); + global::Gtk.Table.TableChild w28 = ((global::Gtk.Table.TableChild)(this.table1[this.vbox2])); + w28.LeftAttach = ((uint)(1)); + w28.RightAttach = ((uint)(2)); // Container child table1.Gtk.Table+TableChild - this.vbox3 = new global::Gtk.VBox (); + this.vbox3 = new global::Gtk.VBox(); this.vbox3.Name = "vbox3"; this.vbox3.Spacing = 6; // Container child vbox3.Gtk.Box+BoxChild - this.label2 = new global::Gtk.Label (); + this.label2 = new global::Gtk.Label(); this.label2.Name = "label2"; this.label2.Xalign = 0F; this.label2.LabelProp = "Interfaces selectionnées : "; - this.vbox3.Add (this.label2); - global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.label2])); - w43.Position = 0; - w43.Expand = false; - w43.Fill = false; + this.vbox3.Add(this.label2); + global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.label2])); + w29.Position = 0; + w29.Expand = false; + w29.Fill = false; // Container child vbox3.Gtk.Box+BoxChild - this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow1.Name = "GtkScrolledWindow1"; this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild - this.listKnown = new global::Gtk.TreeView (); + this.listKnown = new global::Gtk.TreeView(); this.listKnown.CanFocus = true; this.listKnown.Name = "listKnown"; this.listKnown.HeadersVisible = false; - this.GtkScrolledWindow1.Add (this.listKnown); - this.vbox3.Add (this.GtkScrolledWindow1); - global::Gtk.Box.BoxChild w45 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.GtkScrolledWindow1])); - w45.Position = 1; - this.table1.Add (this.vbox3); - global::Gtk.Table.TableChild w46 = ((global::Gtk.Table.TableChild)(this.table1 [this.vbox3])); - w46.TopAttach = ((uint)(2)); - w46.BottomAttach = ((uint)(3)); - w46.LeftAttach = ((uint)(1)); - w46.RightAttach = ((uint)(2)); - w1.Add (this.table1); - global::Gtk.Box.BoxChild w47 = ((global::Gtk.Box.BoxChild)(w1 [this.table1])); - w47.Position = 0; + this.GtkScrolledWindow1.Add(this.listKnown); + this.vbox3.Add(this.GtkScrolledWindow1); + global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.GtkScrolledWindow1])); + w31.Position = 1; + this.table1.Add(this.vbox3); + global::Gtk.Table.TableChild w32 = ((global::Gtk.Table.TableChild)(this.table1[this.vbox3])); + w32.TopAttach = ((uint)(2)); + w32.BottomAttach = ((uint)(3)); + w32.LeftAttach = ((uint)(1)); + w32.RightAttach = ((uint)(2)); + w1.Add(this.table1); + global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(w1[this.table1])); + w33.Position = 0; // Internal child DMX2.GestionMidiUI.ActionArea - global::Gtk.HButtonBox w48 = this.ActionArea; - w48.Name = "dialog1_ActionArea"; - w48.Spacing = 10; - w48.BorderWidth = ((uint)(5)); - w48.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + global::Gtk.HButtonBox w34 = this.ActionArea; + w34.Name = "dialog1_ActionArea"; + w34.Spacing = 10; + w34.BorderWidth = ((uint)(5)); + w34.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.btnClearEvents = new global::Gtk.Button (); + this.btnClearEvents = new global::Gtk.Button(); this.btnClearEvents.CanFocus = true; this.btnClearEvents.Name = "btnClearEvents"; this.btnClearEvents.UseUnderline = true; this.btnClearEvents.Label = "Delier tout les évenements"; - this.AddActionWidget (this.btnClearEvents, 0); - global::Gtk.ButtonBox.ButtonBoxChild w49 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w48 [this.btnClearEvents])); - w49.Expand = false; - w49.Fill = false; + this.AddActionWidget(this.btnClearEvents, 0); + global::Gtk.ButtonBox.ButtonBoxChild w35 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w34[this.btnClearEvents])); + w35.Expand = false; + w35.Fill = false; // 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.CanFocus = true; this.buttonClose.Name = "buttonClose"; this.buttonClose.UseStock = true; this.buttonClose.UseUnderline = true; this.buttonClose.Label = "gtk-close"; - this.AddActionWidget (this.buttonClose, -7); - global::Gtk.ButtonBox.ButtonBoxChild w50 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w48 [this.buttonClose])); - w50.Position = 1; - w50.Expand = false; - w50.Fill = false; - if ((this.Child != null)) { - this.Child.ShowAll (); + this.AddActionWidget(this.buttonClose, -7); + global::Gtk.ButtonBox.ButtonBoxChild w36 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w34[this.buttonClose])); + w36.Position = 1; + w36.Expand = false; + w36.Fill = false; + if ((this.Child != null)) + { + this.Child.ShowAll(); } this.DefaultWidth = 838; this.DefaultHeight = 567; - this.Show (); - this.listKnown.CursorChanged += new global::System.EventHandler (this.OnListKnownCursorChanged); - this.listDetect.CursorChanged += new global::System.EventHandler (this.OnListDetectCursorChanged); - this.btnActiv.Clicked += new global::System.EventHandler (this.OnBtnActivClicked); - this.btnDesactiv.Clicked += new global::System.EventHandler (this.OnBtnDesactivClicked); - this.chkFB.Toggled += new global::System.EventHandler (this.OnChkFBToggled); - this.spinUPCh.ValueChanged += new global::System.EventHandler (this.OnSpinUPChValueChanged); - this.spinPageUp.ValueChanged += new global::System.EventHandler (this.OnSpinPageUpValueChanged); - this.spinPageDown.ValueChanged += new global::System.EventHandler (this.OnSpinPageDownValueChanged); - this.spinMax14b.ValueChanged += new global::System.EventHandler (this.OnSpinMax14bValueChanged); - this.chkPg.Toggled += new global::System.EventHandler (this.OnChkPgToggled); - this.chkFourteenBits.Toggled += new global::System.EventHandler (this.OnChkFourteenBitsToggled); - this.btnClearEvents.Clicked += new global::System.EventHandler (this.OnBtnClearEventsClicked); - this.buttonClose.Clicked += new global::System.EventHandler (this.OnButtonCloseClicked); + this.Show(); + this.listKnown.CursorChanged += new global::System.EventHandler(this.OnListKnownCursorChanged); + this.listDetect.CursorChanged += new global::System.EventHandler(this.OnListDetectCursorChanged); + this.btnActiv.Clicked += new global::System.EventHandler(this.OnBtnActivClicked); + this.btnDesactiv.Clicked += new global::System.EventHandler(this.OnBtnDesactivClicked); + this.chkFB.Toggled += new global::System.EventHandler(this.OnChkFBToggled); + this.spinUPCh.ValueChanged += new global::System.EventHandler(this.OnSpinUPChValueChanged); + this.spinPageUp.ValueChanged += new global::System.EventHandler(this.OnSpinPageUpValueChanged); + this.spinPageDown.ValueChanged += new global::System.EventHandler(this.OnSpinPageDownValueChanged); + this.spinMax14b.ValueChanged += new global::System.EventHandler(this.OnSpinMax14bValueChanged); + this.chkPg.Toggled += new global::System.EventHandler(this.OnChkPgToggled); + this.chkFourteenBits.Toggled += new global::System.EventHandler(this.OnChkFourteenBitsToggled); + this.btnClearEvents.Clicked += new global::System.EventHandler(this.OnBtnClearEventsClicked); + this.buttonClose.Clicked += new global::System.EventHandler(this.OnButtonCloseClicked); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs index 5b82d65..23225d2 100644 --- a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs +++ b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs @@ -5,566 +5,562 @@ namespace DMX2 public partial class MainWindow { private global::Gtk.UIManager UIManager; + private global::Gtk.Action openAction; + private global::Gtk.Action saveAction; + private global::Gtk.Action saveAsAction; + private global::Gtk.Action quitAction; + private global::Gtk.Action closeAction; + private global::Gtk.Action TestAction; + private global::Gtk.Action circAction; + private global::Gtk.Action propertiesAction; + private global::Gtk.Action FichierAction; + private global::Gtk.Action newAction; + private global::Gtk.Action seqLinAction; + private global::Gtk.Action fullscreenAction; + private global::Gtk.Action fullscreenAction1; + private global::Gtk.Action showAllAction; + private global::Gtk.Action universAction; + private global::Gtk.Action connectAction; + private global::Gtk.Action seqMacroAction; + private global::Gtk.Action selectColorAction; + private global::Gtk.Action aboutAction; + private global::Gtk.Action midiAction; + private global::Gtk.Action connectAction1; + private global::Gtk.Action selectColorAction1; + private global::Gtk.Action seqSonAction; + private global::Gtk.Action selectColorAction2; + + private global::Gtk.Action seqMidiAction; + private global::Gtk.VBox vbox1; + private global::Gtk.HBox hbox1; + private global::Gtk.VBox vbox2; + private global::Gtk.Button btnGo; + private global::Gtk.Button btnGoBack; + private global::Gtk.Button btnAjoutLigne; + private global::Gtk.Button btnRetireLigne; + private global::Gtk.ToggleButton btnBlackOut; + private global::Gtk.ToggleButton btnPause; + private global::Gtk.EventBox evBBox; + private global::Gtk.Label timeLabel; + private global::Gtk.VScale masterScale; + private global::Gtk.EventBox evBBox1; + private global::Gtk.VBox vbox3; + private global::Gtk.Label lblPage; + private global::Gtk.Label lblpagesmall; + private global::Gtk.VSeparator vseparator1; + private global::Gtk.HPaned hpaned1; + private global::Gtk.HPaned hpaned2; + private global::Gtk.VBox vbox4; + private global::Gtk.EventBox evBBox2; + private global::Gtk.VBox vbox5; + private global::Gtk.Label labelMasterPos; + private global::Gtk.Label labelMasterNext; + private global::Gtk.ScrolledWindow GtkScrolledWindow2; + private global::Gtk.NodeView MatriceUI; + private global::Gtk.ScrolledWindow scrolledwindow2; + private global::Gtk.VBox vboxCircuits; + private global::Gtk.HSeparator hseparator1; + private global::Gtk.HBox hbox4; + private global::Gtk.Toolbar toolbar7; + private global::Gtk.EventBox evInfo; + private global::Gtk.Label lblInfo; + private global::Gtk.Toolbar toolbar8; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.MainWindow - this.UIManager = new global::Gtk.UIManager (); - global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default"); - this.openAction = new global::Gtk.Action ("openAction", "_Ouvrir", "Ouvrir", "gtk-open"); + this.UIManager = new global::Gtk.UIManager(); + global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default"); + this.openAction = new global::Gtk.Action("openAction", "_Ouvrir", "Ouvrir", "gtk-open"); this.openAction.ShortLabel = "_Ouvrir"; - w1.Add (this.openAction, null); - this.saveAction = new global::Gtk.Action ("saveAction", null, "Enregistrer", "gtk-save"); + w1.Add(this.openAction, null); + this.saveAction = new global::Gtk.Action("saveAction", null, "Enregistrer", "gtk-save"); this.saveAction.Sensitive = false; - w1.Add (this.saveAction, null); - this.saveAsAction = new global::Gtk.Action ("saveAsAction", null, "Enregistrer sous ...", "gtk-save-as"); + w1.Add(this.saveAction, null); + this.saveAsAction = new global::Gtk.Action("saveAsAction", null, "Enregistrer sous ...", "gtk-save-as"); this.saveAsAction.Sensitive = false; - w1.Add (this.saveAsAction, null); - this.quitAction = new global::Gtk.Action ("quitAction", null, "Quitter", "gtk-quit"); - w1.Add (this.quitAction, null); - this.closeAction = new global::Gtk.Action ("closeAction", null, "Fermer", "gtk-close"); + w1.Add(this.saveAsAction, null); + this.quitAction = new global::Gtk.Action("quitAction", null, "Quitter", "gtk-quit"); + w1.Add(this.quitAction, null); + this.closeAction = new global::Gtk.Action("closeAction", null, "Fermer", "gtk-close"); this.closeAction.Sensitive = false; - w1.Add (this.closeAction, null); - this.TestAction = new global::Gtk.Action ("TestAction", "Test", null, null); + w1.Add(this.closeAction, null); + this.TestAction = new global::Gtk.Action("TestAction", "Test", null, null); this.TestAction.ShortLabel = "Test"; - w1.Add (this.TestAction, null); - this.circAction = new global::Gtk.Action ("circAction", "Gestion des Circuits", "Gestion des Circuits", "circuits"); + w1.Add(this.TestAction, null); + this.circAction = new global::Gtk.Action("circAction", "Gestion des Circuits", "Gestion des Circuits", "circuits"); this.circAction.Sensitive = false; this.circAction.ShortLabel = "Circuits"; - w1.Add (this.circAction, null); - this.propertiesAction = new global::Gtk.Action ("propertiesAction", "Circuits", null, "gtk-properties"); + w1.Add(this.circAction, null); + this.propertiesAction = new global::Gtk.Action("propertiesAction", "Circuits", null, "gtk-properties"); this.propertiesAction.ShortLabel = "Circuits"; - w1.Add (this.propertiesAction, null); - this.FichierAction = new global::Gtk.Action ("FichierAction", "_Fichier", null, null); + w1.Add(this.propertiesAction, null); + this.FichierAction = new global::Gtk.Action("FichierAction", "_Fichier", null, null); this.FichierAction.ShortLabel = "_Fichier"; - w1.Add (this.FichierAction, null); - this.newAction = new global::Gtk.Action ("newAction", null, "Nouvelle Conduite", "gtk-new"); - w1.Add (this.newAction, null); - this.seqLinAction = new global::Gtk.Action ("seqLinAction", "Ajout Sequenceur", "Ajouter un sequenceur lineraire", "tirettes"); + w1.Add(this.FichierAction, null); + this.newAction = new global::Gtk.Action("newAction", null, "Nouvelle Conduite", "gtk-new"); + w1.Add(this.newAction, null); + this.seqLinAction = new global::Gtk.Action("seqLinAction", "Ajout Sequenceur", "Ajouter un sequenceur lineraire", "tirettes"); this.seqLinAction.Sensitive = false; this.seqLinAction.ShortLabel = "Ajout Sequenceur"; - w1.Add (this.seqLinAction, null); - this.fullscreenAction = new global::Gtk.Action ("fullscreenAction", "_Plein écran", null, "gtk-fullscreen"); + w1.Add(this.seqLinAction, null); + this.fullscreenAction = new global::Gtk.Action("fullscreenAction", "_Plein écran", null, "gtk-fullscreen"); this.fullscreenAction.ShortLabel = "_Plein écran"; - w1.Add (this.fullscreenAction, null); - this.fullscreenAction1 = new global::Gtk.Action ("fullscreenAction1", "_Plein écran", "Plein Ecran", "gtk-fullscreen"); + w1.Add(this.fullscreenAction, null); + this.fullscreenAction1 = new global::Gtk.Action("fullscreenAction1", "_Plein écran", "Plein Ecran", "gtk-fullscreen"); this.fullscreenAction1.ShortLabel = "_Plein écran"; - w1.Add (this.fullscreenAction1, null); - this.showAllAction = new global::Gtk.Action ("showAllAction", "ShowAll", "Tout réafficher", "gtk-refresh"); + w1.Add(this.fullscreenAction1, null); + this.showAllAction = new global::Gtk.Action("showAllAction", "ShowAll", "Tout réafficher", "gtk-refresh"); this.showAllAction.Sensitive = false; this.showAllAction.ShortLabel = "ShowAll"; - w1.Add (this.showAllAction, null); - this.universAction = new global::Gtk.Action ("universAction", "Univers", "Gestion des Univers", "gtk-execute"); + w1.Add(this.showAllAction, null); + this.universAction = new global::Gtk.Action("universAction", "Univers", "Gestion des Univers", "gtk-execute"); this.universAction.Sensitive = false; this.universAction.ShortLabel = "Univers"; - w1.Add (this.universAction, null); - this.connectAction = new global::Gtk.Action ("connectAction", null, "Connecter d'un boitier", "gtk-connect"); - w1.Add (this.connectAction, null); - this.seqMacroAction = new global::Gtk.Action ("seqMacroAction", null, "Ajouter un sequenceur macro", "gtk-index"); + w1.Add(this.universAction, null); + this.connectAction = new global::Gtk.Action("connectAction", null, "Connecter d\'un boitier", "gtk-connect"); + w1.Add(this.connectAction, null); + this.seqMacroAction = new global::Gtk.Action("seqMacroAction", null, "Ajouter un sequenceur macro", "gtk-index"); this.seqMacroAction.Sensitive = false; - w1.Add (this.seqMacroAction, null); - this.selectColorAction = new global::Gtk.Action ("selectColorAction", null, "Recharger le theme", "gtk-select-color"); - w1.Add (this.selectColorAction, null); - this.aboutAction = new global::Gtk.Action ("aboutAction", null, null, "gtk-about"); - w1.Add (this.aboutAction, null); - this.midiAction = new global::Gtk.Action ("midiAction", null, null, "gtk-preferences"); - w1.Add (this.midiAction, null); - this.connectAction1 = new global::Gtk.Action ("connectAction1", "Connection Midi", null, "gtk-connect"); + w1.Add(this.seqMacroAction, null); + this.selectColorAction = new global::Gtk.Action("selectColorAction", null, "Recharger le theme", "gtk-select-color"); + w1.Add(this.selectColorAction, null); + this.aboutAction = new global::Gtk.Action("aboutAction", null, null, "gtk-about"); + w1.Add(this.aboutAction, null); + this.midiAction = new global::Gtk.Action("midiAction", null, null, "gtk-preferences"); + w1.Add(this.midiAction, null); + this.connectAction1 = new global::Gtk.Action("connectAction1", "Connection Midi", null, "gtk-connect"); this.connectAction1.ShortLabel = "Connection Midi"; - w1.Add (this.connectAction1, null); - this.selectColorAction1 = new global::Gtk.Action ("selectColorAction1", null, null, "gtk-select-color"); - w1.Add (this.selectColorAction1, null); - this.seqSonAction = new global::Gtk.Action ("seqSonAction", null, null, "gtk-cdrom"); + w1.Add(this.connectAction1, null); + this.selectColorAction1 = new global::Gtk.Action("selectColorAction1", null, null, "gtk-select-color"); + w1.Add(this.selectColorAction1, null); + this.seqSonAction = new global::Gtk.Action("seqSonAction", null, null, "gtk-cdrom"); this.seqSonAction.Sensitive = false; - w1.Add (this.seqSonAction, null); - this.selectColorAction2 = new global::Gtk.Action ("selectColorAction2", null, null, "gtk-select-color"); + w1.Add(this.seqSonAction, null); + this.selectColorAction2 = new global::Gtk.Action("selectColorAction2", null, null, "gtk-select-color"); this.selectColorAction2.Visible = false; - this.selectColorAction2.VisibleHorizontal = false; - this.selectColorAction2.VisibleVertical = false; - this.selectColorAction2.VisibleOverflown = false; - w1.Add (this.selectColorAction2, null); - this.UIManager.InsertActionGroup (w1, 0); - this.AddAccelGroup (this.UIManager.AccelGroup); + w1.Add(this.selectColorAction2, null); + this.seqMidiAction = new global::Gtk.Action("seqMidiAction", null, null, "MidiSeq"); + this.seqMidiAction.Sensitive = false; + w1.Add(this.seqMidiAction, null); + this.UIManager.InsertActionGroup(w1, 0); + this.AddAccelGroup(this.UIManager.AccelGroup); this.Name = "DMX2.MainWindow"; this.Title = "MainWindow"; this.WindowPosition = ((global::Gtk.WindowPosition)(4)); this.BorderWidth = ((uint)(3)); // Container child DMX2.MainWindow.Gtk.Container+ContainerChild - this.vbox1 = new global::Gtk.VBox (); + this.vbox1 = new global::Gtk.VBox(); this.vbox1.Name = "vbox1"; this.vbox1.Spacing = 6; // Container child vbox1.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox (); + this.hbox1 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.vbox2 = new global::Gtk.VBox (); + this.vbox2 = new global::Gtk.VBox(); this.vbox2.Name = "vbox2"; this.vbox2.Spacing = 6; // Container child vbox2.Gtk.Box+BoxChild - this.btnGo = new global::Gtk.Button (); + this.btnGo = new global::Gtk.Button(); this.btnGo.CanFocus = true; this.btnGo.Name = "btnGo"; this.btnGo.UseUnderline = true; - // Container child btnGo.Gtk.Container+ContainerChild - global::Gtk.Alignment w2 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w3 = new global::Gtk.HBox (); - w3.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w4 = new global::Gtk.Image (); - w4.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-goto-last", global::Gtk.IconSize.Dnd); - w3.Add (w4); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w6 = new global::Gtk.Label (); - w3.Add (w6); - w2.Add (w3); - this.btnGo.Add (w2); - this.vbox2.Add (this.btnGo); - global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnGo])); - w10.Position = 0; - w10.Expand = false; - w10.Fill = false; + global::Gtk.Image w2 = new global::Gtk.Image(); + w2.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-goto-last", global::Gtk.IconSize.Dnd); + this.btnGo.Image = w2; + this.vbox2.Add(this.btnGo); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.btnGo])); + w3.Position = 0; + w3.Expand = false; + w3.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.btnGoBack = new global::Gtk.Button (); + this.btnGoBack = new global::Gtk.Button(); this.btnGoBack.CanFocus = true; this.btnGoBack.Name = "btnGoBack"; this.btnGoBack.UseUnderline = true; - // Container child btnGoBack.Gtk.Container+ContainerChild - global::Gtk.Alignment w11 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w12 = new global::Gtk.HBox (); - w12.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w13 = new global::Gtk.Image (); - w13.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-goto-first", global::Gtk.IconSize.Dnd); - w12.Add (w13); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w15 = new global::Gtk.Label (); - w12.Add (w15); - w11.Add (w12); - this.btnGoBack.Add (w11); - this.vbox2.Add (this.btnGoBack); - global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnGoBack])); - w19.Position = 1; - w19.Expand = false; - w19.Fill = false; + global::Gtk.Image w4 = new global::Gtk.Image(); + w4.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-goto-first", global::Gtk.IconSize.Dnd); + this.btnGoBack.Image = w4; + this.vbox2.Add(this.btnGoBack); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.btnGoBack])); + w5.Position = 1; + w5.Expand = false; + w5.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.btnAjoutLigne = new global::Gtk.Button (); + this.btnAjoutLigne = new global::Gtk.Button(); this.btnAjoutLigne.TooltipMarkup = "Ajoute ligne sous\ncelle selectionnée"; this.btnAjoutLigne.CanFocus = true; this.btnAjoutLigne.Name = "btnAjoutLigne"; this.btnAjoutLigne.UseUnderline = true; - // Container child btnAjoutLigne.Gtk.Container+ContainerChild - global::Gtk.Alignment w20 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w21 = new global::Gtk.HBox (); - w21.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w22 = new global::Gtk.Image (); - w22.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add", global::Gtk.IconSize.Dnd); - w21.Add (w22); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w24 = new global::Gtk.Label (); - w21.Add (w24); - w20.Add (w21); - this.btnAjoutLigne.Add (w20); - this.vbox2.Add (this.btnAjoutLigne); - global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnAjoutLigne])); - w28.Position = 2; - w28.Expand = false; - w28.Fill = false; + global::Gtk.Image w6 = new global::Gtk.Image(); + w6.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-add", global::Gtk.IconSize.Dnd); + this.btnAjoutLigne.Image = w6; + this.vbox2.Add(this.btnAjoutLigne); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.btnAjoutLigne])); + w7.Position = 2; + w7.Expand = false; + w7.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.btnRetireLigne = new global::Gtk.Button (); + this.btnRetireLigne = new global::Gtk.Button(); this.btnRetireLigne.TooltipMarkup = "Retire la ligne selectionnée"; this.btnRetireLigne.CanFocus = true; this.btnRetireLigne.Name = "btnRetireLigne"; this.btnRetireLigne.UseUnderline = true; - // Container child btnRetireLigne.Gtk.Container+ContainerChild - global::Gtk.Alignment w29 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w30 = new global::Gtk.HBox (); - w30.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w31 = new global::Gtk.Image (); - w31.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-remove", global::Gtk.IconSize.Dnd); - w30.Add (w31); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w33 = new global::Gtk.Label (); - w30.Add (w33); - w29.Add (w30); - this.btnRetireLigne.Add (w29); - this.vbox2.Add (this.btnRetireLigne); - global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnRetireLigne])); - w37.Position = 3; - w37.Expand = false; - w37.Fill = false; + global::Gtk.Image w8 = new global::Gtk.Image(); + w8.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-remove", global::Gtk.IconSize.Dnd); + this.btnRetireLigne.Image = w8; + this.vbox2.Add(this.btnRetireLigne); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.btnRetireLigne])); + w9.Position = 3; + w9.Expand = false; + w9.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.btnBlackOut = new global::Gtk.ToggleButton (); + this.btnBlackOut = new global::Gtk.ToggleButton(); this.btnBlackOut.TooltipMarkup = "Blackout"; this.btnBlackOut.CanFocus = true; this.btnBlackOut.Name = "btnBlackOut"; this.btnBlackOut.UseUnderline = true; - // Container child btnBlackOut.Gtk.Container+ContainerChild - global::Gtk.Alignment w38 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w39 = new global::Gtk.HBox (); - w39.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w40 = new global::Gtk.Image (); - w40.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-no", global::Gtk.IconSize.Dnd); - w39.Add (w40); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w42 = new global::Gtk.Label (); - w39.Add (w42); - w38.Add (w39); - this.btnBlackOut.Add (w38); - this.vbox2.Add (this.btnBlackOut); - global::Gtk.Box.BoxChild w46 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnBlackOut])); - w46.Position = 4; - w46.Expand = false; - w46.Fill = false; + global::Gtk.Image w10 = new global::Gtk.Image(); + w10.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-no", global::Gtk.IconSize.Dnd); + this.btnBlackOut.Image = w10; + this.vbox2.Add(this.btnBlackOut); + global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.btnBlackOut])); + w11.Position = 4; + w11.Expand = false; + w11.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.btnPause = new global::Gtk.ToggleButton (); + this.btnPause = new global::Gtk.ToggleButton(); this.btnPause.TooltipMarkup = "Pause"; this.btnPause.CanFocus = true; this.btnPause.Name = "btnPause"; this.btnPause.UseUnderline = true; - // Container child btnPause.Gtk.Container+ContainerChild - global::Gtk.Alignment w47 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w48 = new global::Gtk.HBox (); - w48.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w49 = new global::Gtk.Image (); - w49.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-pause", global::Gtk.IconSize.Dnd); - w48.Add (w49); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w51 = new global::Gtk.Label (); - w48.Add (w51); - w47.Add (w48); - this.btnPause.Add (w47); - this.vbox2.Add (this.btnPause); - global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.btnPause])); - w55.Position = 5; - w55.Expand = false; - w55.Fill = false; + global::Gtk.Image w12 = new global::Gtk.Image(); + w12.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-media-pause", global::Gtk.IconSize.Dnd); + this.btnPause.Image = w12; + this.vbox2.Add(this.btnPause); + global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.btnPause])); + w13.Position = 5; + w13.Expand = false; + w13.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.evBBox = new global::Gtk.EventBox (); + this.evBBox = new global::Gtk.EventBox(); this.evBBox.Name = "evBBox"; // Container child evBBox.Gtk.Container+ContainerChild - this.timeLabel = new global::Gtk.Label (); + this.timeLabel = new global::Gtk.Label(); this.timeLabel.Name = "timeLabel"; this.timeLabel.Ypad = 8; this.timeLabel.LabelProp = "0.00"; this.timeLabel.UseMarkup = true; this.timeLabel.Justify = ((global::Gtk.Justification)(2)); - this.timeLabel.Angle = 90; - this.evBBox.Add (this.timeLabel); - this.vbox2.Add (this.evBBox); - global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.evBBox])); - w57.Position = 6; - w57.Expand = false; - w57.Fill = false; + this.timeLabel.Angle = 90D; + this.evBBox.Add(this.timeLabel); + this.vbox2.Add(this.evBBox); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.evBBox])); + w15.Position = 6; + w15.Expand = false; + w15.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.masterScale = new global::Gtk.VScale (null); + this.masterScale = new global::Gtk.VScale(null); this.masterScale.TooltipMarkup = "Master"; this.masterScale.HeightRequest = 75; this.masterScale.Name = "masterScale"; this.masterScale.Inverted = true; - this.masterScale.Adjustment.Upper = 100; - this.masterScale.Adjustment.PageIncrement = 10; - this.masterScale.Adjustment.StepIncrement = 1; - this.masterScale.Adjustment.Value = 100; + this.masterScale.Adjustment.Upper = 100D; + this.masterScale.Adjustment.PageIncrement = 10D; + this.masterScale.Adjustment.StepIncrement = 1D; + this.masterScale.Adjustment.Value = 100D; this.masterScale.DrawValue = true; this.masterScale.Digits = 0; this.masterScale.ValuePos = ((global::Gtk.PositionType)(2)); - this.vbox2.Add (this.masterScale); - global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.masterScale])); - w58.Position = 7; + this.vbox2.Add(this.masterScale); + global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.masterScale])); + w16.Position = 7; // Container child vbox2.Gtk.Box+BoxChild - this.evBBox1 = new global::Gtk.EventBox (); + this.evBBox1 = new global::Gtk.EventBox(); this.evBBox1.Name = "evBBox1"; // Container child evBBox1.Gtk.Container+ContainerChild - this.vbox3 = new global::Gtk.VBox (); + this.vbox3 = new global::Gtk.VBox(); this.vbox3.Name = "vbox3"; this.vbox3.Spacing = 6; // Container child vbox3.Gtk.Box+BoxChild - this.lblPage = new global::Gtk.Label (); + this.lblPage = new global::Gtk.Label(); this.lblPage.Name = "lblPage"; this.lblPage.LabelProp = "0"; - this.vbox3.Add (this.lblPage); - global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.lblPage])); - w59.Position = 0; - w59.Expand = false; - w59.Fill = false; + this.vbox3.Add(this.lblPage); + global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.lblPage])); + w17.Position = 0; + w17.Expand = false; + w17.Fill = false; // Container child vbox3.Gtk.Box+BoxChild - this.lblpagesmall = new global::Gtk.Label (); + this.lblpagesmall = new global::Gtk.Label(); this.lblpagesmall.HeightRequest = 28; this.lblpagesmall.Name = "lblpagesmall"; this.lblpagesmall.LabelProp = "midi\npage"; this.lblpagesmall.UseMarkup = true; - this.vbox3.Add (this.lblpagesmall); - global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.lblpagesmall])); - w60.Position = 1; - w60.Fill = false; - this.evBBox1.Add (this.vbox3); - this.vbox2.Add (this.evBBox1); - global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.evBBox1])); - w62.Position = 8; - w62.Expand = false; - w62.Fill = false; - this.hbox1.Add (this.vbox2); - global::Gtk.Box.BoxChild w63 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2])); - w63.Position = 0; - w63.Expand = false; - w63.Fill = false; + this.vbox3.Add(this.lblpagesmall); + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.lblpagesmall])); + w18.Position = 1; + w18.Fill = false; + this.evBBox1.Add(this.vbox3); + this.vbox2.Add(this.evBBox1); + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.evBBox1])); + w20.Position = 8; + w20.Expand = false; + w20.Fill = false; + this.hbox1.Add(this.vbox2); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox2])); + w21.Position = 0; + w21.Expand = false; + w21.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.vseparator1 = new global::Gtk.VSeparator (); + this.vseparator1 = new global::Gtk.VSeparator(); this.vseparator1.Name = "vseparator1"; - this.hbox1.Add (this.vseparator1); - global::Gtk.Box.BoxChild w64 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vseparator1])); - w64.Position = 1; - w64.Expand = false; - w64.Fill = false; + this.hbox1.Add(this.vseparator1); + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vseparator1])); + w22.Position = 1; + w22.Expand = false; + w22.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.hpaned1 = new global::Gtk.HPaned (); + this.hpaned1 = new global::Gtk.HPaned(); this.hpaned1.CanFocus = true; this.hpaned1.Name = "hpaned1"; this.hpaned1.Position = 776; // Container child hpaned1.Gtk.Paned+PanedChild - this.hpaned2 = new global::Gtk.HPaned (); + this.hpaned2 = new global::Gtk.HPaned(); this.hpaned2.CanFocus = true; this.hpaned2.Name = "hpaned2"; this.hpaned2.Position = 177; // Container child hpaned2.Gtk.Paned+PanedChild - this.vbox4 = new global::Gtk.VBox (); + this.vbox4 = new global::Gtk.VBox(); this.vbox4.Name = "vbox4"; this.vbox4.Spacing = 6; // Container child vbox4.Gtk.Box+BoxChild - this.evBBox2 = new global::Gtk.EventBox (); + this.evBBox2 = new global::Gtk.EventBox(); this.evBBox2.Name = "evBBox2"; // Container child evBBox2.Gtk.Container+ContainerChild - this.vbox5 = new global::Gtk.VBox (); + this.vbox5 = new global::Gtk.VBox(); this.vbox5.Name = "vbox5"; this.vbox5.Spacing = 6; // Container child vbox5.Gtk.Box+BoxChild - this.labelMasterPos = new global::Gtk.Label (); + this.labelMasterPos = new global::Gtk.Label(); this.labelMasterPos.Name = "labelMasterPos"; this.labelMasterPos.Xpad = 4; this.labelMasterPos.Ypad = 1; this.labelMasterPos.Xalign = 0F; this.labelMasterPos.LabelProp = "\t"; - this.vbox5.Add (this.labelMasterPos); - global::Gtk.Box.BoxChild w65 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.labelMasterPos])); - w65.Position = 0; - w65.Expand = false; - w65.Fill = false; + this.vbox5.Add(this.labelMasterPos); + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.labelMasterPos])); + w23.Position = 0; + w23.Expand = false; + w23.Fill = false; // Container child vbox5.Gtk.Box+BoxChild - this.labelMasterNext = new global::Gtk.Label (); + this.labelMasterNext = new global::Gtk.Label(); this.labelMasterNext.Name = "labelMasterNext"; this.labelMasterNext.Xpad = 20; this.labelMasterNext.Xalign = 0F; this.labelMasterNext.LabelProp = "\t"; - this.vbox5.Add (this.labelMasterNext); - global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.labelMasterNext])); - w66.Position = 1; - w66.Expand = false; - w66.Fill = false; - this.evBBox2.Add (this.vbox5); - this.vbox4.Add (this.evBBox2); - global::Gtk.Box.BoxChild w68 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.evBBox2])); - w68.Position = 0; - w68.Expand = false; - w68.Fill = false; + this.vbox5.Add(this.labelMasterNext); + global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.labelMasterNext])); + w24.Position = 1; + w24.Expand = false; + w24.Fill = false; + this.evBBox2.Add(this.vbox5); + this.vbox4.Add(this.evBBox2); + global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.evBBox2])); + w26.Position = 0; + w26.Expand = false; + w26.Fill = false; // Container child vbox4.Gtk.Box+BoxChild - this.GtkScrolledWindow2 = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow2 = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow2.Name = "GtkScrolledWindow2"; this.GtkScrolledWindow2.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow2.Gtk.Container+ContainerChild - this.MatriceUI = new global::Gtk.NodeView (); + this.MatriceUI = new global::Gtk.NodeView(); this.MatriceUI.CanFocus = true; this.MatriceUI.Name = "MatriceUI"; this.MatriceUI.RulesHint = true; - this.GtkScrolledWindow2.Add (this.MatriceUI); - this.vbox4.Add (this.GtkScrolledWindow2); - global::Gtk.Box.BoxChild w70 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.GtkScrolledWindow2])); - w70.Position = 1; - this.hpaned2.Add (this.vbox4); - global::Gtk.Paned.PanedChild w71 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.vbox4])); - w71.Resize = false; - this.hpaned1.Add (this.hpaned2); - global::Gtk.Paned.PanedChild w72 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2])); - w72.Resize = false; + this.GtkScrolledWindow2.Add(this.MatriceUI); + this.vbox4.Add(this.GtkScrolledWindow2); + global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.GtkScrolledWindow2])); + w28.Position = 1; + this.hpaned2.Add(this.vbox4); + global::Gtk.Paned.PanedChild w29 = ((global::Gtk.Paned.PanedChild)(this.hpaned2[this.vbox4])); + w29.Resize = false; + this.hpaned1.Add(this.hpaned2); + global::Gtk.Paned.PanedChild w30 = ((global::Gtk.Paned.PanedChild)(this.hpaned1[this.hpaned2])); + w30.Resize = false; // Container child hpaned1.Gtk.Paned+PanedChild - this.scrolledwindow2 = new global::Gtk.ScrolledWindow (); + this.scrolledwindow2 = new global::Gtk.ScrolledWindow(); this.scrolledwindow2.WidthRequest = 150; this.scrolledwindow2.CanFocus = true; this.scrolledwindow2.Name = "scrolledwindow2"; this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child scrolledwindow2.Gtk.Container+ContainerChild - global::Gtk.Viewport w73 = new global::Gtk.Viewport (); - w73.ShadowType = ((global::Gtk.ShadowType)(0)); + global::Gtk.Viewport w31 = new global::Gtk.Viewport(); + w31.ShadowType = ((global::Gtk.ShadowType)(0)); // Container child GtkViewport1.Gtk.Container+ContainerChild - this.vboxCircuits = new global::Gtk.VBox (); + this.vboxCircuits = new global::Gtk.VBox(); this.vboxCircuits.Name = "vboxCircuits"; this.vboxCircuits.Spacing = 2; - w73.Add (this.vboxCircuits); - this.scrolledwindow2.Add (w73); - this.hpaned1.Add (this.scrolledwindow2); - global::Gtk.Paned.PanedChild w76 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2])); - w76.Resize = false; - w76.Shrink = false; - this.hbox1.Add (this.hpaned1); - global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1])); - w77.Position = 2; - this.vbox1.Add (this.hbox1); - global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); - w78.Position = 0; + w31.Add(this.vboxCircuits); + this.scrolledwindow2.Add(w31); + this.hpaned1.Add(this.scrolledwindow2); + global::Gtk.Paned.PanedChild w34 = ((global::Gtk.Paned.PanedChild)(this.hpaned1[this.scrolledwindow2])); + w34.Resize = false; + w34.Shrink = false; + this.hbox1.Add(this.hpaned1); + global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.hpaned1])); + w35.Position = 2; + this.vbox1.Add(this.hbox1); + global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); + w36.Position = 0; // Container child vbox1.Gtk.Box+BoxChild - this.hseparator1 = new global::Gtk.HSeparator (); + this.hseparator1 = new global::Gtk.HSeparator(); this.hseparator1.Name = "hseparator1"; - this.vbox1.Add (this.hseparator1); - global::Gtk.Box.BoxChild w79 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); - w79.Position = 1; - w79.Expand = false; - w79.Fill = false; + this.vbox1.Add(this.hseparator1); + global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hseparator1])); + w37.Position = 1; + w37.Expand = false; + w37.Fill = false; // Container child vbox1.Gtk.Box+BoxChild - this.hbox4 = new global::Gtk.HBox (); + this.hbox4 = new global::Gtk.HBox(); this.hbox4.Name = "hbox4"; this.hbox4.Spacing = 6; // Container child hbox4.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); - this.toolbar7 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar7"))); + this.UIManager.AddUiFromString(@""); + this.toolbar7 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar7"))); this.toolbar7.Name = "toolbar7"; this.toolbar7.ShowArrow = false; this.toolbar7.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); - this.hbox4.Add (this.toolbar7); - global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7])); - w80.Position = 0; - w80.Expand = false; - w80.Fill = false; + this.hbox4.Add(this.toolbar7); + global::Gtk.Box.BoxChild w38 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.toolbar7])); + w38.Position = 0; + w38.Expand = false; + w38.Fill = false; // Container child hbox4.Gtk.Box+BoxChild - this.evInfo = new global::Gtk.EventBox (); + this.evInfo = new global::Gtk.EventBox(); this.evInfo.Name = "evInfo"; // Container child evInfo.Gtk.Container+ContainerChild - this.lblInfo = new global::Gtk.Label (); + this.lblInfo = new global::Gtk.Label(); this.lblInfo.Name = "lblInfo"; this.lblInfo.LabelProp = "info"; - this.evInfo.Add (this.lblInfo); - this.hbox4.Add (this.evInfo); - global::Gtk.Box.BoxChild w82 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo])); - w82.Position = 1; + this.evInfo.Add(this.lblInfo); + this.hbox4.Add(this.evInfo); + global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.evInfo])); + w40.Position = 1; // Container child hbox4.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); - this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8"))); + this.UIManager.AddUiFromString(@""); + this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar8"))); this.toolbar8.Name = "toolbar8"; this.toolbar8.ShowArrow = false; this.toolbar8.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); - this.hbox4.Add (this.toolbar8); - global::Gtk.Box.BoxChild w83 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8])); - w83.Position = 2; - w83.Expand = false; - w83.Fill = false; - this.vbox1.Add (this.hbox4); - global::Gtk.Box.BoxChild w84 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4])); - w84.Position = 2; - w84.Expand = false; - w84.Fill = false; - this.Add (this.vbox1); - if ((this.Child != null)) { - this.Child.ShowAll (); + this.hbox4.Add(this.toolbar8); + global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.toolbar8])); + w41.Position = 2; + w41.Expand = false; + w41.Fill = false; + this.vbox1.Add(this.hbox4); + global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox4])); + w42.Position = 2; + w42.Expand = false; + w42.Fill = false; + this.Add(this.vbox1); + if ((this.Child != null)) + { + this.Child.ShowAll(); } this.DefaultWidth = 1027; this.DefaultHeight = 709; - this.Show (); - this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent); - this.openAction.Activated += new global::System.EventHandler (this.OnOpenActionActivated); - this.saveAction.Activated += new global::System.EventHandler (this.OnSaveActionActivated); - this.saveAsAction.Activated += new global::System.EventHandler (this.OnSaveAsActionActivated); - this.quitAction.Activated += new global::System.EventHandler (this.OnQuitActionActivated); - this.closeAction.Activated += new global::System.EventHandler (this.OnCloseActionActivated); - this.circAction.Activated += new global::System.EventHandler (this.OnCircuitsActionActivated); - this.newAction.Activated += new global::System.EventHandler (this.OnNewActionActivated); - this.seqLinAction.Activated += new global::System.EventHandler (this.OnSeqLinActionActivated); - this.fullscreenAction1.Activated += new global::System.EventHandler (this.OnFullscreenAction1Activated); - this.showAllAction.Activated += new global::System.EventHandler (this.OnShowAllActionActivated); - this.universAction.Activated += new global::System.EventHandler (this.OnUniversActionActivated); - this.connectAction.Activated += new global::System.EventHandler (this.OnConnectActionActivated); - this.seqMacroAction.Activated += new global::System.EventHandler (this.OnSeqMacroActionActivated); - this.selectColorAction.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated); - this.aboutAction.Activated += new global::System.EventHandler (this.OnAboutActionActivated); - this.midiAction.Activated += new global::System.EventHandler (this.OnMidiActionActivated); - this.selectColorAction1.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated); - this.seqSonAction.Activated += new global::System.EventHandler (this.OnSeqSonActionActivated); - this.selectColorAction2.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated); - this.btnGo.Clicked += new global::System.EventHandler (this.OnBtnGoClicked); - this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked); - this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked); - this.btnRetireLigne.Clicked += new global::System.EventHandler (this.OnBtnRetireLigneClicked); - this.btnBlackOut.Toggled += new global::System.EventHandler (this.OnBtnBlackOutToggled); - this.btnPause.Toggled += new global::System.EventHandler (this.OnBtnPauseToggled); - this.masterScale.ValueChanged += new global::System.EventHandler (this.OnMasterScaleValueChanged); - this.MatriceUI.CursorChanged += new global::System.EventHandler (this.OnMatriceUICursorChanged); + this.Show(); + this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent); + this.openAction.Activated += new global::System.EventHandler(this.OnOpenActionActivated); + this.saveAction.Activated += new global::System.EventHandler(this.OnSaveActionActivated); + this.saveAsAction.Activated += new global::System.EventHandler(this.OnSaveAsActionActivated); + this.quitAction.Activated += new global::System.EventHandler(this.OnQuitActionActivated); + this.closeAction.Activated += new global::System.EventHandler(this.OnCloseActionActivated); + this.circAction.Activated += new global::System.EventHandler(this.OnCircuitsActionActivated); + this.newAction.Activated += new global::System.EventHandler(this.OnNewActionActivated); + this.seqLinAction.Activated += new global::System.EventHandler(this.OnSeqLinActionActivated); + this.fullscreenAction1.Activated += new global::System.EventHandler(this.OnFullscreenAction1Activated); + this.showAllAction.Activated += new global::System.EventHandler(this.OnShowAllActionActivated); + this.universAction.Activated += new global::System.EventHandler(this.OnUniversActionActivated); + this.connectAction.Activated += new global::System.EventHandler(this.OnConnectActionActivated); + this.seqMacroAction.Activated += new global::System.EventHandler(this.OnSeqMacroActionActivated); + this.selectColorAction.Activated += new global::System.EventHandler(this.OnSelectColorActionActivated); + this.aboutAction.Activated += new global::System.EventHandler(this.OnAboutActionActivated); + this.midiAction.Activated += new global::System.EventHandler(this.OnMidiActionActivated); + this.selectColorAction1.Activated += new global::System.EventHandler(this.OnSelectColorActionActivated); + this.seqSonAction.Activated += new global::System.EventHandler(this.OnSeqSonActionActivated); + this.selectColorAction2.Activated += new global::System.EventHandler(this.OnSelectColorActionActivated); + this.seqMidiAction.Activated += new global::System.EventHandler(this.OnSeqMidiActionActivated); + this.btnGo.Clicked += new global::System.EventHandler(this.OnBtnGoClicked); + this.btnGoBack.Clicked += new global::System.EventHandler(this.OnBtnGoBackClicked); + this.btnAjoutLigne.Clicked += new global::System.EventHandler(this.OnBtnAjoutLigneClicked); + this.btnRetireLigne.Clicked += new global::System.EventHandler(this.OnBtnRetireLigneClicked); + this.btnBlackOut.Toggled += new global::System.EventHandler(this.OnBtnBlackOutToggled); + this.btnPause.Toggled += new global::System.EventHandler(this.OnBtnPauseToggled); + this.masterScale.ValueChanged += new global::System.EventHandler(this.OnMasterScaleValueChanged); + this.MatriceUI.CursorChanged += new global::System.EventHandler(this.OnMatriceUICursorChanged); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.SelSeqCircuits.cs b/DMX-2.0/gtk-gui/DMX2.SelSeqCircuits.cs index 8799344..36feef9 100644 --- a/DMX-2.0/gtk-gui/DMX2.SelSeqCircuits.cs +++ b/DMX-2.0/gtk-gui/DMX2.SelSeqCircuits.cs @@ -5,23 +5,36 @@ namespace DMX2 public partial class SelSeqCircuits { private global::Gtk.HBox hbox1; + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView listeToutCircuits; - private global::Gtk.VButtonBox vbuttonbox1; + + private global::Gtk.VButtonBox vbuttonbox; + private global::Gtk.Button ajtBut; + private global::Gtk.Button supBt; + private global::Gtk.Button supToutBut; + private global::Gtk.Button button90; + private global::Gtk.Button mvHautBt; + private global::Gtk.Button mvBasBt; + private global::Gtk.ScrolledWindow GtkScrolledWindow1; + private global::Gtk.TreeView listeSelCircuits; + private global::Gtk.Button buttonCancel; + private global::Gtk.Button buttonOk; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.SelSeqCircuits this.Name = "DMX2.SelSeqCircuits"; this.Title = "Selection des Circuits"; @@ -35,229 +48,169 @@ namespace DMX2 w1.Name = "dialog1_VBox"; w1.BorderWidth = ((uint)(2)); // Container child dialog1_VBox.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox (); + this.hbox1 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - this.listeToutCircuits = new global::Gtk.TreeView (); + this.listeToutCircuits = new global::Gtk.TreeView(); this.listeToutCircuits.CanFocus = true; this.listeToutCircuits.Name = "listeToutCircuits"; - this.GtkScrolledWindow.Add (this.listeToutCircuits); - this.hbox1.Add (this.GtkScrolledWindow); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow])); + this.GtkScrolledWindow.Add(this.listeToutCircuits); + this.hbox1.Add(this.GtkScrolledWindow); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.GtkScrolledWindow])); w3.Position = 0; // Container child hbox1.Gtk.Box+BoxChild - this.vbuttonbox1 = new global::Gtk.VButtonBox (); - this.vbuttonbox1.Name = "vbuttonbox1"; - this.vbuttonbox1.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(3)); - // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild - this.ajtBut = new global::Gtk.Button (); + this.vbuttonbox = new global::Gtk.VButtonBox(); + this.vbuttonbox.Name = "vbuttonbox"; + this.vbuttonbox.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(3)); + // Container child vbuttonbox.Gtk.ButtonBox+ButtonBoxChild + this.ajtBut = new global::Gtk.Button(); this.ajtBut.CanFocus = true; this.ajtBut.Name = "ajtBut"; this.ajtBut.UseUnderline = true; - // Container child ajtBut.Gtk.Container+ContainerChild - global::Gtk.Alignment w4 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w5 = new global::Gtk.HBox (); - w5.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w6 = new global::Gtk.Image (); - w6.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-forward", global::Gtk.IconSize.Menu); - w5.Add (w6); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w8 = new global::Gtk.Label (); - w8.LabelProp = "Ajouter"; - w8.UseUnderline = true; - w5.Add (w8); - w4.Add (w5); - this.ajtBut.Add (w4); - this.vbuttonbox1.Add (this.ajtBut); - global::Gtk.ButtonBox.ButtonBoxChild w12 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.ajtBut])); - w12.Expand = false; - w12.Fill = false; - // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild - this.supBt = new global::Gtk.Button (); + this.ajtBut.Label = "Ajouter"; + global::Gtk.Image w4 = new global::Gtk.Image(); + w4.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-go-forward", global::Gtk.IconSize.Menu); + this.ajtBut.Image = w4; + this.vbuttonbox.Add(this.ajtBut); + global::Gtk.ButtonBox.ButtonBoxChild w5 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox[this.ajtBut])); + w5.Expand = false; + w5.Fill = false; + // Container child vbuttonbox.Gtk.ButtonBox+ButtonBoxChild + this.supBt = new global::Gtk.Button(); this.supBt.CanFocus = true; this.supBt.Name = "supBt"; this.supBt.UseUnderline = true; - // Container child supBt.Gtk.Container+ContainerChild - global::Gtk.Alignment w13 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w14 = new global::Gtk.HBox (); - w14.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w15 = new global::Gtk.Image (); - w15.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-back", global::Gtk.IconSize.Menu); - w14.Add (w15); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w17 = new global::Gtk.Label (); - w17.LabelProp = "Enlever"; - w17.UseUnderline = true; - w14.Add (w17); - w13.Add (w14); - this.supBt.Add (w13); - this.vbuttonbox1.Add (this.supBt); - global::Gtk.ButtonBox.ButtonBoxChild w21 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.supBt])); - w21.Position = 1; - w21.Expand = false; - w21.Fill = false; - // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild - this.supToutBut = new global::Gtk.Button (); + this.supBt.Label = "Enlever"; + global::Gtk.Image w6 = new global::Gtk.Image(); + w6.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-go-back", global::Gtk.IconSize.Menu); + this.supBt.Image = w6; + this.vbuttonbox.Add(this.supBt); + global::Gtk.ButtonBox.ButtonBoxChild w7 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox[this.supBt])); + w7.Position = 1; + w7.Expand = false; + w7.Fill = false; + // Container child vbuttonbox.Gtk.ButtonBox+ButtonBoxChild + this.supToutBut = new global::Gtk.Button(); this.supToutBut.CanFocus = true; this.supToutBut.Name = "supToutBut"; this.supToutBut.UseUnderline = true; - // Container child supToutBut.Gtk.Container+ContainerChild - global::Gtk.Alignment w22 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w23 = new global::Gtk.HBox (); - w23.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w24 = new global::Gtk.Image (); - w24.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-back", global::Gtk.IconSize.Menu); - w23.Add (w24); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w26 = new global::Gtk.Label (); - w26.LabelProp = "Tout Enlever"; - w26.UseUnderline = true; - w23.Add (w26); - w22.Add (w23); - this.supToutBut.Add (w22); - this.vbuttonbox1.Add (this.supToutBut); - global::Gtk.ButtonBox.ButtonBoxChild w30 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.supToutBut])); - w30.Position = 2; - w30.Expand = false; - w30.Fill = false; - // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild - this.button90 = new global::Gtk.Button (); + this.supToutBut.Label = "Tout Enlever"; + global::Gtk.Image w8 = new global::Gtk.Image(); + w8.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-go-back", global::Gtk.IconSize.Menu); + this.supToutBut.Image = w8; + this.vbuttonbox.Add(this.supToutBut); + global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox[this.supToutBut])); + w9.Position = 2; + w9.Expand = false; + w9.Fill = false; + // Container child vbuttonbox.Gtk.ButtonBox+ButtonBoxChild + this.button90 = new global::Gtk.Button(); this.button90.Sensitive = false; this.button90.CanFocus = true; this.button90.Name = "button90"; this.button90.UseUnderline = true; this.button90.Relief = ((global::Gtk.ReliefStyle)(2)); - this.button90.Label = ""; - this.vbuttonbox1.Add (this.button90); - global::Gtk.ButtonBox.ButtonBoxChild w31 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.button90])); - w31.Position = 3; - w31.Expand = false; - w31.Fill = false; - // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild - this.mvHautBt = new global::Gtk.Button (); + this.vbuttonbox.Add(this.button90); + global::Gtk.ButtonBox.ButtonBoxChild w10 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox[this.button90])); + w10.Position = 3; + w10.Expand = false; + w10.Fill = false; + // Container child vbuttonbox.Gtk.ButtonBox+ButtonBoxChild + this.mvHautBt = new global::Gtk.Button(); this.mvHautBt.CanFocus = true; this.mvHautBt.Name = "mvHautBt"; this.mvHautBt.UseUnderline = true; - // Container child mvHautBt.Gtk.Container+ContainerChild - global::Gtk.Alignment w32 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w33 = new global::Gtk.HBox (); - w33.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w34 = new global::Gtk.Image (); - w34.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-up", global::Gtk.IconSize.Menu); - w33.Add (w34); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w36 = new global::Gtk.Label (); - w36.LabelProp = "Monter"; - w36.UseUnderline = true; - w33.Add (w36); - w32.Add (w33); - this.mvHautBt.Add (w32); - this.vbuttonbox1.Add (this.mvHautBt); - global::Gtk.ButtonBox.ButtonBoxChild w40 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.mvHautBt])); - w40.Position = 4; - w40.Expand = false; - w40.Fill = false; - // Container child vbuttonbox1.Gtk.ButtonBox+ButtonBoxChild - this.mvBasBt = new global::Gtk.Button (); + this.mvHautBt.Label = "Monter"; + global::Gtk.Image w11 = new global::Gtk.Image(); + w11.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-go-up", global::Gtk.IconSize.Menu); + this.mvHautBt.Image = w11; + this.vbuttonbox.Add(this.mvHautBt); + global::Gtk.ButtonBox.ButtonBoxChild w12 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox[this.mvHautBt])); + w12.Position = 4; + w12.Expand = false; + w12.Fill = false; + // Container child vbuttonbox.Gtk.ButtonBox+ButtonBoxChild + this.mvBasBt = new global::Gtk.Button(); this.mvBasBt.CanFocus = true; this.mvBasBt.Name = "mvBasBt"; this.mvBasBt.UseUnderline = true; - // Container child mvBasBt.Gtk.Container+ContainerChild - global::Gtk.Alignment w41 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w42 = new global::Gtk.HBox (); - w42.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w43 = new global::Gtk.Image (); - w43.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-down", global::Gtk.IconSize.Menu); - w42.Add (w43); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w45 = new global::Gtk.Label (); - w45.LabelProp = "Descendre"; - w45.UseUnderline = true; - w42.Add (w45); - w41.Add (w42); - this.mvBasBt.Add (w41); - this.vbuttonbox1.Add (this.mvBasBt); - global::Gtk.ButtonBox.ButtonBoxChild w49 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox1 [this.mvBasBt])); - w49.Position = 5; - w49.Expand = false; - w49.Fill = false; - this.hbox1.Add (this.vbuttonbox1); - global::Gtk.Box.BoxChild w50 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbuttonbox1])); - w50.Position = 1; - w50.Expand = false; - w50.Fill = false; + this.mvBasBt.Label = "Descendre"; + global::Gtk.Image w13 = new global::Gtk.Image(); + w13.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-go-down", global::Gtk.IconSize.Menu); + this.mvBasBt.Image = w13; + this.vbuttonbox.Add(this.mvBasBt); + global::Gtk.ButtonBox.ButtonBoxChild w14 = ((global::Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox[this.mvBasBt])); + w14.Position = 5; + w14.Expand = false; + w14.Fill = false; + this.hbox1.Add(this.vbuttonbox); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbuttonbox])); + w15.Position = 1; + w15.Expand = false; + w15.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow1.Name = "GtkScrolledWindow1"; this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild - this.listeSelCircuits = new global::Gtk.TreeView (); + this.listeSelCircuits = new global::Gtk.TreeView(); this.listeSelCircuits.CanFocus = true; this.listeSelCircuits.Name = "listeSelCircuits"; - this.GtkScrolledWindow1.Add (this.listeSelCircuits); - this.hbox1.Add (this.GtkScrolledWindow1); - global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow1])); - w52.Position = 2; - w1.Add (this.hbox1); - global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox1])); - w53.Position = 0; + this.GtkScrolledWindow1.Add(this.listeSelCircuits); + this.hbox1.Add(this.GtkScrolledWindow1); + global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.GtkScrolledWindow1])); + w17.Position = 2; + w1.Add(this.hbox1); + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(w1[this.hbox1])); + w18.Position = 0; // Internal child DMX2.SelSeqCircuits.ActionArea - global::Gtk.HButtonBox w54 = this.ActionArea; - w54.Name = "dialog1_ActionArea"; - w54.Spacing = 10; - w54.BorderWidth = ((uint)(5)); - w54.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + global::Gtk.HButtonBox w19 = this.ActionArea; + w19.Name = "dialog1_ActionArea"; + w19.Spacing = 10; + w19.BorderWidth = ((uint)(5)); + w19.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonCancel = new global::Gtk.Button (); + this.buttonCancel = new global::Gtk.Button(); this.buttonCancel.CanDefault = true; this.buttonCancel.CanFocus = true; this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.UseStock = true; this.buttonCancel.UseUnderline = true; this.buttonCancel.Label = "gtk-cancel"; - this.AddActionWidget (this.buttonCancel, -6); - global::Gtk.ButtonBox.ButtonBoxChild w55 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w54 [this.buttonCancel])); - w55.Expand = false; - w55.Fill = false; + this.AddActionWidget(this.buttonCancel, -6); + global::Gtk.ButtonBox.ButtonBoxChild w20 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w19[this.buttonCancel])); + w20.Expand = false; + w20.Fill = false; // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonOk = new global::Gtk.Button (); + this.buttonOk = new global::Gtk.Button(); this.buttonOk.CanDefault = true; this.buttonOk.CanFocus = true; this.buttonOk.Name = "buttonOk"; this.buttonOk.UseStock = true; this.buttonOk.UseUnderline = true; this.buttonOk.Label = "gtk-ok"; - this.AddActionWidget (this.buttonOk, -5); - global::Gtk.ButtonBox.ButtonBoxChild w56 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w54 [this.buttonOk])); - w56.Position = 1; - w56.Expand = false; - w56.Fill = false; - if ((this.Child != null)) { - this.Child.ShowAll (); + this.AddActionWidget(this.buttonOk, -5); + global::Gtk.ButtonBox.ButtonBoxChild w21 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w19[this.buttonOk])); + w21.Position = 1; + w21.Expand = false; + w21.Fill = false; + if ((this.Child != null)) + { + this.Child.ShowAll(); } this.DefaultWidth = 740; this.DefaultHeight = 587; - this.Hide (); - this.ajtBut.Clicked += new global::System.EventHandler (this.OnAjtButClicked); - this.supBt.Clicked += new global::System.EventHandler (this.OnSupBtClicked); - this.supToutBut.Clicked += new global::System.EventHandler (this.OnSupToutButClicked); - this.mvHautBt.Clicked += new global::System.EventHandler (this.OnMvHautBtClicked); - this.mvBasBt.Clicked += new global::System.EventHandler (this.OnMvBasBtClicked); + this.Hide(); + this.ajtBut.Clicked += new global::System.EventHandler(this.OnAjtButClicked); + this.supBt.Clicked += new global::System.EventHandler(this.OnSupBtClicked); + this.supToutBut.Clicked += new global::System.EventHandler(this.OnSupToutButClicked); + this.mvHautBt.Clicked += new global::System.EventHandler(this.OnMvHautBtClicked); + this.mvBasBt.Clicked += new global::System.EventHandler(this.OnMvBasBtClicked); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.SeqLinUI.cs b/DMX-2.0/gtk-gui/DMX2.SeqLinUI.cs index 7a54214..6c1bbe9 100644 --- a/DMX-2.0/gtk-gui/DMX2.SeqLinUI.cs +++ b/DMX-2.0/gtk-gui/DMX2.SeqLinUI.cs @@ -5,116 +5,149 @@ namespace DMX2 public partial class SeqLinUI { private global::Gtk.UIManager UIManager; + private global::Gtk.Action goBackAction; + private global::Gtk.Action goForwardAction; + private global::Gtk.Action applyAction; + private global::Gtk.Action mediaPauseAction; + private global::Gtk.Action mediaNextAction; + private global::Gtk.Action saveAction; + private global::Gtk.Action saveAfterAction; + private global::Gtk.Action deleteAction; + private global::Gtk.Action moveUpAction; + private global::Gtk.Action moveDownAction; + private global::Gtk.Action circuitsAction; + private global::Gtk.Action closeAction; + private global::Gtk.ToggleAction pourcentBtn; + private global::Gtk.Frame frame1; + private global::Gtk.Alignment GtkAlignment; + private global::Gtk.VBox vbox2; + private global::Gtk.HBox hbox1; + private global::Gtk.VBox vbox4; + private global::Gtk.EventBox evBBox; + private global::Gtk.HBox hbox2; + private global::Gtk.Label posLabel; + private global::Gtk.Label timeLabel; + private global::Gtk.HScale seqMasterScale; + private global::Gtk.ProgressBar pbTrans; + private global::Gtk.ProgressBar pbDuree; + private global::Gtk.Toolbar toolbar1; + private global::Gtk.Toolbar toolbar2; + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView effetsListe; + private global::Gtk.Toolbar toolbar3; + private global::Gtk.ScrolledWindow GtkScrolledWindow1; + private global::Gtk.Fixed zoneWid; + private global::Gtk.Label titreLabel; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.SeqLinUI - Stetic.BinContainer w1 = global::Stetic.BinContainer.Attach (this); - this.UIManager = new global::Gtk.UIManager (); - global::Gtk.ActionGroup w2 = new global::Gtk.ActionGroup ("Default"); - this.goBackAction = new global::Gtk.Action ("goBackAction", null, null, "gtk-go-back"); - w2.Add (this.goBackAction, null); - this.goForwardAction = new global::Gtk.Action ("goForwardAction", null, null, "gtk-go-forward"); - w2.Add (this.goForwardAction, null); - this.applyAction = new global::Gtk.Action ("applyAction", null, "Ecrase l'effet selectionné.", "gtk-apply"); - w2.Add (this.applyAction, null); - this.mediaPauseAction = new global::Gtk.Action ("mediaPauseAction", null, "Pause", "gtk-media-pause"); - w2.Add (this.mediaPauseAction, null); - this.mediaNextAction = new global::Gtk.Action ("mediaNextAction", null, "Fin de transition", "gtk-media-next"); - w2.Add (this.mediaNextAction, null); - this.saveAction = new global::Gtk.Action ("saveAction", null, "Enregistre l'effet à la fin.", "gtk-save"); - w2.Add (this.saveAction, null); - this.saveAfterAction = new global::Gtk.Action ("saveAfterAction", null, "Insère un effet sous celui selectionné.", "gtk-save-as"); - w2.Add (this.saveAfterAction, null); - this.deleteAction = new global::Gtk.Action ("deleteAction", null, "Supprime l'effet selectionné.", "gtk-delete"); - w2.Add (this.deleteAction, null); - this.moveUpAction = new global::Gtk.Action ("moveUpAction", null, "", "gtk-go-up"); - w2.Add (this.moveUpAction, null); - this.moveDownAction = new global::Gtk.Action ("moveDownAction", null, null, "gtk-go-down"); - w2.Add (this.moveDownAction, null); - this.circuitsAction = new global::Gtk.Action ("circuitsAction", null, "Association des circuits\nau sequenceur", "circuits"); - w2.Add (this.circuitsAction, null); - this.closeAction = new global::Gtk.Action ("closeAction", null, null, "gtk-close"); - w2.Add (this.closeAction, null); - this.pourcentBtn = new global::Gtk.ToggleAction ("pourcentBtn", null, null, "gtk-zoom-100"); - w2.Add (this.pourcentBtn, null); - this.UIManager.InsertActionGroup (w2, 0); + Stetic.BinContainer w1 = global::Stetic.BinContainer.Attach(this); + this.UIManager = new global::Gtk.UIManager(); + global::Gtk.ActionGroup w2 = new global::Gtk.ActionGroup("Default"); + this.goBackAction = new global::Gtk.Action("goBackAction", null, null, "gtk-go-back"); + w2.Add(this.goBackAction, null); + this.goForwardAction = new global::Gtk.Action("goForwardAction", null, null, "gtk-go-forward"); + w2.Add(this.goForwardAction, null); + this.applyAction = new global::Gtk.Action("applyAction", null, "Ecrase l\'effet selectionné.", "gtk-apply"); + w2.Add(this.applyAction, null); + this.mediaPauseAction = new global::Gtk.Action("mediaPauseAction", null, "Pause", "gtk-media-pause"); + w2.Add(this.mediaPauseAction, null); + this.mediaNextAction = new global::Gtk.Action("mediaNextAction", null, "Fin de transition", "gtk-media-next"); + w2.Add(this.mediaNextAction, null); + this.saveAction = new global::Gtk.Action("saveAction", null, "Enregistre l\'effet à la fin.", "gtk-save"); + w2.Add(this.saveAction, null); + this.saveAfterAction = new global::Gtk.Action("saveAfterAction", null, "Insère un effet sous celui selectionné.", "gtk-save-as"); + w2.Add(this.saveAfterAction, null); + this.deleteAction = new global::Gtk.Action("deleteAction", null, "Supprime l\'effet selectionné.", "gtk-delete"); + w2.Add(this.deleteAction, null); + this.moveUpAction = new global::Gtk.Action("moveUpAction", null, "", "gtk-go-up"); + w2.Add(this.moveUpAction, null); + this.moveDownAction = new global::Gtk.Action("moveDownAction", null, null, "gtk-go-down"); + w2.Add(this.moveDownAction, null); + this.circuitsAction = new global::Gtk.Action("circuitsAction", null, "Association des circuits\nau sequenceur", "circuits"); + w2.Add(this.circuitsAction, null); + this.closeAction = new global::Gtk.Action("closeAction", null, null, "gtk-close"); + w2.Add(this.closeAction, null); + this.pourcentBtn = new global::Gtk.ToggleAction("pourcentBtn", null, null, "gtk-zoom-100"); + w2.Add(this.pourcentBtn, null); + this.UIManager.InsertActionGroup(w2, 0); this.Name = "DMX2.SeqLinUI"; // Container child DMX2.SeqLinUI.Gtk.Container+ContainerChild - this.frame1 = new global::Gtk.Frame (); + 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 = new global::Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment.Name = "GtkAlignment"; this.GtkAlignment.LeftPadding = ((uint)(12)); // Container child GtkAlignment.Gtk.Container+ContainerChild - this.vbox2 = new global::Gtk.VBox (); + 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 = new global::Gtk.HBox(); this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.vbox4 = new global::Gtk.VBox (); + this.vbox4 = new global::Gtk.VBox(); this.vbox4.Name = "vbox4"; // Container child vbox4.Gtk.Box+BoxChild - this.evBBox = new global::Gtk.EventBox (); + this.evBBox = new global::Gtk.EventBox(); this.evBBox.Name = "evBBox"; // Container child evBBox.Gtk.Container+ContainerChild - this.hbox2 = new global::Gtk.HBox (); + this.hbox2 = new global::Gtk.HBox(); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild - this.posLabel = new global::Gtk.Label (); + 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 = "n°0"; this.posLabel.UseMarkup = true; - this.hbox2.Add (this.posLabel); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.posLabel])); + 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.timeLabel = new global::Gtk.Label (); + this.timeLabel = new global::Gtk.Label(); this.timeLabel.HeightRequest = 33; this.timeLabel.Name = "timeLabel"; this.timeLabel.Xpad = 15; @@ -122,157 +155,158 @@ namespace DMX2 this.timeLabel.LabelProp = "0.00"; this.timeLabel.UseMarkup = true; this.timeLabel.Justify = ((global::Gtk.Justification)(1)); - this.hbox2.Add (this.timeLabel); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.timeLabel])); + this.hbox2.Add(this.timeLabel); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.timeLabel])); w4.PackType = ((global::Gtk.PackType)(1)); w4.Position = 1; w4.Expand = false; w4.Fill = false; - this.evBBox.Add (this.hbox2); - this.vbox4.Add (this.evBBox); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.evBBox])); + this.evBBox.Add(this.hbox2); + this.vbox4.Add(this.evBBox); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.evBBox])); w6.Position = 0; w6.Expand = false; w6.Fill = false; // Container child vbox4.Gtk.Box+BoxChild - this.seqMasterScale = new global::Gtk.HScale (null); + this.seqMasterScale = new global::Gtk.HScale(null); this.seqMasterScale.CanFocus = true; this.seqMasterScale.Name = "seqMasterScale"; - this.seqMasterScale.Adjustment.Upper = 100; - this.seqMasterScale.Adjustment.PageIncrement = 10; - this.seqMasterScale.Adjustment.StepIncrement = 1; - this.seqMasterScale.Adjustment.Value = 100; + 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.vbox4.Add (this.seqMasterScale); - global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.seqMasterScale])); + this.vbox4.Add(this.seqMasterScale); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.seqMasterScale])); w7.Position = 1; w7.Expand = false; w7.Fill = false; // Container child vbox4.Gtk.Box+BoxChild - this.pbTrans = new global::Gtk.ProgressBar (); + this.pbTrans = new global::Gtk.ProgressBar(); this.pbTrans.HeightRequest = 15; this.pbTrans.Name = "pbTrans"; - this.vbox4.Add (this.pbTrans); - global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.pbTrans])); + this.vbox4.Add(this.pbTrans); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.pbTrans])); w8.Position = 2; w8.Expand = false; w8.Fill = false; // Container child vbox4.Gtk.Box+BoxChild - this.pbDuree = new global::Gtk.ProgressBar (); + this.pbDuree = new global::Gtk.ProgressBar(); this.pbDuree.HeightRequest = 15; this.pbDuree.Name = "pbDuree"; - this.vbox4.Add (this.pbDuree); - global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.pbDuree])); + this.vbox4.Add(this.pbDuree); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.pbDuree])); w9.Position = 3; w9.Expand = false; w9.Fill = false; // Container child vbox4.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); - this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar1"))); + this.UIManager.AddUiFromString(@""); + this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar1"))); this.toolbar1.Name = "toolbar1"; this.toolbar1.ShowArrow = false; this.toolbar1.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.toolbar1.IconSize = ((global::Gtk.IconSize)(2)); - this.vbox4.Add (this.toolbar1); - global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.toolbar1])); + this.vbox4.Add(this.toolbar1); + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.toolbar1])); w10.Position = 4; w10.Expand = false; w10.Fill = false; // Container child vbox4.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); - this.toolbar2 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar2"))); + this.UIManager.AddUiFromString(@""); + this.toolbar2 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar2"))); this.toolbar2.Name = "toolbar2"; this.toolbar2.ShowArrow = false; this.toolbar2.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.toolbar2.IconSize = ((global::Gtk.IconSize)(2)); - this.vbox4.Add (this.toolbar2); - global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.toolbar2])); + this.vbox4.Add(this.toolbar2); + global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox4[this.toolbar2])); w11.Position = 5; w11.Expand = false; w11.Fill = false; - this.hbox1.Add (this.vbox4); - global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox4])); + this.hbox1.Add(this.vbox4); + global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox4])); w12.Position = 0; w12.Expand = false; w12.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.HscrollbarPolicy = ((global::Gtk.PolicyType)(2)); this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - this.effetsListe = new global::Gtk.TreeView (); + this.effetsListe = new global::Gtk.TreeView(); this.effetsListe.CanFocus = true; this.effetsListe.Name = "effetsListe"; this.effetsListe.RulesHint = true; - this.GtkScrolledWindow.Add (this.effetsListe); - this.hbox1.Add (this.GtkScrolledWindow); - global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow])); + this.GtkScrolledWindow.Add(this.effetsListe); + this.hbox1.Add(this.GtkScrolledWindow); + global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.GtkScrolledWindow])); w14.Position = 1; // Container child hbox1.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); - this.toolbar3 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar3"))); + this.UIManager.AddUiFromString(@""); + this.toolbar3 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar3"))); this.toolbar3.Name = "toolbar3"; this.toolbar3.Orientation = ((global::Gtk.Orientation)(1)); this.toolbar3.ShowArrow = false; this.toolbar3.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.toolbar3.IconSize = ((global::Gtk.IconSize)(2)); - this.hbox1.Add (this.toolbar3); - global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar3])); + this.hbox1.Add(this.toolbar3); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.toolbar3])); w15.Position = 2; w15.Expand = false; w15.Fill = false; - this.vbox2.Add (this.hbox1); - global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1])); + 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.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow1.Name = "GtkScrolledWindow1"; // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild - global::Gtk.Viewport w17 = new global::Gtk.Viewport (); + global::Gtk.Viewport w17 = new global::Gtk.Viewport(); w17.ShadowType = ((global::Gtk.ShadowType)(0)); // Container child GtkViewport.Gtk.Container+ContainerChild - this.zoneWid = new global::Gtk.Fixed (); + this.zoneWid = new global::Gtk.Fixed(); this.zoneWid.HeightRequest = 0; this.zoneWid.Name = "zoneWid"; this.zoneWid.HasWindow = false; - w17.Add (this.zoneWid); - this.GtkScrolledWindow1.Add (w17); - this.vbox2.Add (this.GtkScrolledWindow1); - global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow1])); + w17.Add(this.zoneWid); + this.GtkScrolledWindow1.Add(w17); + this.vbox2.Add(this.GtkScrolledWindow1); + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow1])); w20.Position = 1; - this.GtkAlignment.Add (this.vbox2); - this.frame1.Add (this.GtkAlignment); - this.titreLabel = new global::Gtk.Label (); + this.GtkAlignment.Add(this.vbox2); + this.frame1.Add(this.GtkAlignment); + this.titreLabel = new global::Gtk.Label(); this.titreLabel.Name = "titreLabel"; this.titreLabel.LabelProp = "Sequenceur Lineaire"; this.titreLabel.UseMarkup = true; this.frame1.LabelWidget = this.titreLabel; - this.Add (this.frame1); - if ((this.Child != null)) { - this.Child.ShowAll (); + this.Add(this.frame1); + if ((this.Child != null)) + { + this.Child.ShowAll(); } - w1.SetUiManager (UIManager); - this.Show (); - this.goBackAction.Activated += new global::System.EventHandler (this.OnGoBackActionActivated); - this.goForwardAction.Activated += new global::System.EventHandler (this.OnGoForwardActionActivated); - this.applyAction.Activated += new global::System.EventHandler (this.OnApplyActionActivated); - this.mediaPauseAction.Activated += new global::System.EventHandler (this.OnMediaPauseActionActivated); - this.mediaNextAction.Activated += new global::System.EventHandler (this.OnMediaNextActionActivated); - this.saveAction.Activated += new global::System.EventHandler (this.OnSaveActionActivated); - this.saveAfterAction.Activated += new global::System.EventHandler (this.OnSaveAfterActionActivated); - this.deleteAction.Activated += new global::System.EventHandler (this.OnDeleteActionActivated); - this.moveUpAction.Activated += new global::System.EventHandler (this.OnMoveUpActionActivated); - this.moveDownAction.Activated += new global::System.EventHandler (this.OnMoveDownActionActivated); - this.circuitsAction.Activated += new global::System.EventHandler (this.OnCircuitsActionActivated); - this.closeAction.Activated += new global::System.EventHandler (this.OnCloseActionActivated); - this.pourcentBtn.Toggled += new global::System.EventHandler (this.OnPourcentBtnToggled); - this.seqMasterScale.ValueChanged += new global::System.EventHandler (this.OnSeqMasterScaleValueChanged); - this.zoneWid.SizeAllocated += new global::Gtk.SizeAllocatedHandler (this.OnZoneWidSizeAllocated); + w1.SetUiManager(UIManager); + this.Show(); + this.goBackAction.Activated += new global::System.EventHandler(this.OnGoBackActionActivated); + this.goForwardAction.Activated += new global::System.EventHandler(this.OnGoForwardActionActivated); + this.applyAction.Activated += new global::System.EventHandler(this.OnApplyActionActivated); + this.mediaPauseAction.Activated += new global::System.EventHandler(this.OnMediaPauseActionActivated); + this.mediaNextAction.Activated += new global::System.EventHandler(this.OnMediaNextActionActivated); + this.saveAction.Activated += new global::System.EventHandler(this.OnSaveActionActivated); + this.saveAfterAction.Activated += new global::System.EventHandler(this.OnSaveAfterActionActivated); + this.deleteAction.Activated += new global::System.EventHandler(this.OnDeleteActionActivated); + this.moveUpAction.Activated += new global::System.EventHandler(this.OnMoveUpActionActivated); + this.moveDownAction.Activated += new global::System.EventHandler(this.OnMoveDownActionActivated); + this.circuitsAction.Activated += new global::System.EventHandler(this.OnCircuitsActionActivated); + this.closeAction.Activated += new global::System.EventHandler(this.OnCloseActionActivated); + this.pourcentBtn.Toggled += new global::System.EventHandler(this.OnPourcentBtnToggled); + this.seqMasterScale.ValueChanged += new global::System.EventHandler(this.OnSeqMasterScaleValueChanged); + this.zoneWid.SizeAllocated += new global::Gtk.SizeAllocatedHandler(this.OnZoneWidSizeAllocated); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.SeqMacroUI.cs b/DMX-2.0/gtk-gui/DMX2.SeqMacroUI.cs index 3199b2f..2aa7453 100644 --- a/DMX-2.0/gtk-gui/DMX2.SeqMacroUI.cs +++ b/DMX-2.0/gtk-gui/DMX2.SeqMacroUI.cs @@ -5,265 +5,283 @@ namespace DMX2 public partial class SeqMacroUI { 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 () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.SeqMacroUI - 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"); + 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); + 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.SeqMacroUI"; // Container child DMX2.SeqMacroUI.Gtk.Container+ContainerChild - this.frame1 = new global::Gtk.Frame (); + 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 = 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 = 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 = 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 = 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 = new global::Gtk.VBox(); this.vbox3.Name = "vbox3"; // Container child vbox3.Gtk.Box+BoxChild - this.evBBox = new global::Gtk.EventBox (); + this.evBBox = new global::Gtk.EventBox(); this.evBBox.Name = "evBBox"; // Container child evBBox.Gtk.Container+ContainerChild - this.hbox2 = new global::Gtk.HBox (); + 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 = new global::Gtk.Label(); this.posLabel.HeightRequest = 33; this.posLabel.Name = "posLabel"; this.posLabel.Xpad = 15; this.posLabel.Xalign = 0F; this.posLabel.LabelProp = "n° 0"; this.posLabel.UseMarkup = true; - this.hbox2.Add (this.posLabel); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.posLabel])); + 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 = 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])); + 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 = new global::Gtk.Label(); this.timeLabel.HeightRequest = 33; this.timeLabel.Name = "timeLabel"; this.timeLabel.Xpad = 15; this.timeLabel.LabelProp = "00.0"; this.timeLabel.UseMarkup = true; - this.hbox2.Add (this.timeLabel); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.timeLabel])); + 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])); + 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 = new global::Gtk.HScale(null); this.seqMasterScale.CanFocus = true; this.seqMasterScale.Name = "seqMasterScale"; - this.seqMasterScale.Adjustment.Upper = 100; - this.seqMasterScale.Adjustment.PageIncrement = 10; - this.seqMasterScale.Adjustment.StepIncrement = 1; - this.seqMasterScale.Adjustment.Value = 100; + 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])); + 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 = 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 = 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])); + 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 = new global::Gtk.Button(); this.btnCommand.CanFocus = true; this.btnCommand.Name = "btnCommand"; this.btnCommand.UseUnderline = true; - // Container child btnCommand.Gtk.Container+ContainerChild - global::Gtk.Alignment w10 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w11 = new global::Gtk.HBox (); - 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); - global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnCommand])); - w18.Position = 1; - w18.Expand = false; - w18.Fill = false; - this.vbox3.Add (this.hbox3); - global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox3])); - w19.Position = 2; - w19.Expand = false; - w19.Fill = false; + 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 (""); - this.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar"))); + this.UIManager.AddUiFromString(@""); + 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 w20 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.toolbar])); - w20.Position = 3; - w20.Expand = false; - w20.Fill = false; - this.hbox1.Add (this.vbox3); - global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3])); - w21.Position = 0; + 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 (""); - this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar1"))); + this.UIManager.AddUiFromString("<" + + "toolitem name=\'circuitsAction\' action=\'circuitsAction\'/>"); + 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 w22 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar1])); - w22.PackType = ((global::Gtk.PackType)(1)); - w22.Position = 1; - w22.Expand = false; - w22.Fill = false; - this.vbox2.Add (this.hbox1); - global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1])); - w23.Position = 0; - w23.Expand = false; - w23.Fill = false; + 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 = 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 = 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 w25 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.scrolledwindow1])); - w25.Position = 1; - this.alignment1.Add (this.vbox2); - this.GtkAlignment.Add (this.alignment1); - this.frame1.Add (this.GtkAlignment); - this.titreLabel = new global::Gtk.Label (); + 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 (); + 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); + 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); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.SeqMidiUI.cs b/DMX-2.0/gtk-gui/DMX2.SeqMidiUI.cs new file mode 100644 index 0000000..c57243b --- /dev/null +++ b/DMX-2.0/gtk-gui/DMX2.SeqMidiUI.cs @@ -0,0 +1,252 @@ + +// 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 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.Action Action; + + 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.ComboBox cbDest; + + private global::Gtk.Toolbar toolbar; + + private global::Gtk.Toolbar toolbar1; + + private global::Gtk.ScrolledWindow scrolledwindow1; + + private global::Gtk.TreeView cmdList; + + private global::Gtk.Label lblText; + + 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.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.Action = new global::Gtk.Action("Action", null, null, null); + w2.Add(this.Action, 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 = "n° 0"; + 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 = "00.0"; + 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.cbDest = global::Gtk.ComboBox.NewText(); + this.cbDest.Name = "cbDest"; + this.vbox3.Add(this.cbDest); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.cbDest])); + w8.Position = 1; + w8.Expand = false; + w8.Fill = false; + // Container child vbox3.Gtk.Box+BoxChild + this.UIManager.AddUiFromString(@""); + 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 w9 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.toolbar])); + w9.Position = 2; + w9.Expand = false; + w9.Fill = false; + this.hbox1.Add(this.vbox3); + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox3])); + w10.Position = 0; + // Container child hbox1.Gtk.Box+BoxChild + this.UIManager.AddUiFromString("<" + + "/toolbar>"); + 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 w11 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.toolbar1])); + w11.PackType = ((global::Gtk.PackType)(1)); + w11.Position = 1; + w11.Expand = false; + w11.Fill = false; + this.vbox2.Add(this.hbox1); + global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); + w12.Position = 0; + w12.Expand = false; + w12.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.cmdList = new global::Gtk.TreeView(); + this.cmdList.CanFocus = true; + this.cmdList.Name = "cmdList"; + this.cmdList.RulesHint = true; + this.scrolledwindow1.Add(this.cmdList); + this.vbox2.Add(this.scrolledwindow1); + global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.scrolledwindow1])); + w14.Position = 1; + // Container child vbox2.Gtk.Box+BoxChild + this.lblText = new global::Gtk.Label(); + this.lblText.Name = "lblText"; + this.lblText.Xalign = 0F; + this.lblText.LabelProp = "CC : Control Change (ex: CC12,100)\nPC : Program Change (ex: PC5)\nN : Note On/Off " + + "(ex: N64+127 ou N12-)\nGT : Go To (ex: GT4)\nr: loop"; + this.lblText.UseMarkup = true; + this.vbox2.Add(this.lblText); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.lblText])); + w15.Position = 2; + w15.Expand = false; + w15.Fill = false; + 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 Midi"; + 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.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.cmdList.CursorChanged += new global::System.EventHandler(this.OnCmdListeCursorChanged); + } + } +} diff --git a/DMX-2.0/gtk-gui/DMX2.SeqOscUI.cs b/DMX-2.0/gtk-gui/DMX2.SeqOscUI.cs new file mode 100644 index 0000000..0026e3c --- /dev/null +++ b/DMX-2.0/gtk-gui/DMX2.SeqOscUI.cs @@ -0,0 +1,252 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace DMX2 +{ + public partial class SeqOscUI + { + private global::Gtk.UIManager UIManager; + + private global::Gtk.ToggleAction closeAction; + + 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.Action Action; + + 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.HBox hbox3; + + private global::Gtk.Toolbar toolbar; + + private global::Gtk.Entry entryDest; + + private global::Gtk.Toolbar toolbar1; + + private global::Gtk.ScrolledWindow scrolledwindow1; + + private global::Gtk.TreeView cmdList; + + private global::Gtk.Label titreLabel; + + protected virtual void Build() + { + global::Stetic.Gui.Initialize(this); + // Widget DMX2.SeqOscUI + 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.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.Action = new global::Gtk.Action("Action", null, null, null); + w2.Add(this.Action, null); + this.UIManager.InsertActionGroup(w2, 0); + this.Name = "DMX2.SeqOscUI"; + // Container child DMX2.SeqOscUI.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 = "n° 0"; + 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 = "00.0"; + 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.hbox3 = new global::Gtk.HBox(); + this.hbox3.Name = "hbox3"; + this.hbox3.Spacing = 6; + // Container child hbox3.Gtk.Box+BoxChild + this.UIManager.AddUiFromString(@""); + 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.hbox3.Add(this.toolbar); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.toolbar])); + w8.Position = 0; + // Container child hbox3.Gtk.Box+BoxChild + this.entryDest = new global::Gtk.Entry(); + this.entryDest.WidthRequest = 220; + this.entryDest.CanFocus = true; + this.entryDest.Name = "entryDest"; + this.entryDest.IsEditable = true; + this.entryDest.InvisibleChar = '●'; + this.hbox3.Add(this.entryDest); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.entryDest])); + w9.Position = 2; + w9.Expand = false; + w9.Fill = false; + this.vbox3.Add(this.hbox3); + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox3])); + w10.Position = 1; + w10.Expand = false; + w10.Fill = false; + this.hbox1.Add(this.vbox3); + global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox3])); + w11.Position = 0; + // Container child hbox1.Gtk.Box+BoxChild + this.UIManager.AddUiFromString("<" + + "/toolbar>"); + 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 w12 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.toolbar1])); + w12.PackType = ((global::Gtk.PackType)(1)); + w12.Position = 1; + w12.Expand = false; + w12.Fill = false; + this.vbox2.Add(this.hbox1); + global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); + w13.Position = 0; + w13.Expand = false; + w13.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.cmdList = new global::Gtk.TreeView(); + this.cmdList.CanFocus = true; + this.cmdList.Name = "cmdList"; + this.cmdList.RulesHint = true; + this.scrolledwindow1.Add(this.cmdList); + this.vbox2.Add(this.scrolledwindow1); + global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.scrolledwindow1])); + w15.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 OSC"; + 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.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.entryDest.Changed += new global::System.EventHandler(this.OnEntryDestChanged); + this.cmdList.CursorChanged += new global::System.EventHandler(this.OnCmdListeCursorChanged); + } + } +} diff --git a/DMX-2.0/gtk-gui/DMX2.SeqSonUI.cs b/DMX-2.0/gtk-gui/DMX2.SeqSonUI.cs index 3ab3843..cc9f342 100644 --- a/DMX-2.0/gtk-gui/DMX2.SeqSonUI.cs +++ b/DMX-2.0/gtk-gui/DMX2.SeqSonUI.cs @@ -5,447 +5,414 @@ namespace DMX2 public partial class SeqSonUI { private global::Gtk.UIManager UIManager; + private global::Gtk.Action closeAction; + private global::Gtk.Action mediaPlayAction; + private global::Gtk.Action mediaPauseAction; + private global::Gtk.Action mediaStopAction; + private global::Gtk.Action mediaPreviousAction; + private global::Gtk.Action mediaRewindAction; + private global::Gtk.Action mediaForwardAction; + private global::Gtk.Action mediaNextAction; + private global::Gtk.Action actAddFile; + private global::Gtk.Action actDelFile; + private global::Gtk.Action preferencesAction; + private global::Gtk.Action closeAction1; + private global::Gtk.Action preferencesAction1; + private global::Gtk.Frame frame1; + private global::Gtk.Alignment GtkAlignment; + 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 titleLabel; + private global::Gtk.Label timeLabel; + private global::Gtk.ProgressBar pbCur; + private global::Gtk.HBox hbox3; + private global::Gtk.Button btnPlay; + private global::Gtk.Button btnPause; + private global::Gtk.Button btnStop; + private global::Gtk.Button btnPrev; + private global::Gtk.Button btnRewind; + private global::Gtk.Button btnForward; + private global::Gtk.Button btnNext; + private global::Gtk.Entry txtGoto; + private global::Gtk.Button btnGoto; + private global::Gtk.VScale sclVolume; + private global::Gtk.Toolbar toolbar4; + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.NodeView listFiles; + private global::Gtk.Label label1; + private global::Gtk.Label titreLabel; - protected virtual void Build () + protected virtual void Build() { - global::Stetic.Gui.Initialize (this); + global::Stetic.Gui.Initialize(this); // Widget DMX2.SeqSonUI - 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.Action ("closeAction", null, null, "gtk-close"); - w2.Add (this.closeAction, null); - this.mediaPlayAction = new global::Gtk.Action ("mediaPlayAction", null, null, "gtk-media-play"); - w2.Add (this.mediaPlayAction, null); - this.mediaPauseAction = new global::Gtk.Action ("mediaPauseAction", null, null, "gtk-media-pause"); - w2.Add (this.mediaPauseAction, null); - this.mediaStopAction = new global::Gtk.Action ("mediaStopAction", null, null, "gtk-media-stop"); - w2.Add (this.mediaStopAction, null); - this.mediaPreviousAction = new global::Gtk.Action ("mediaPreviousAction", null, null, "gtk-media-previous"); - w2.Add (this.mediaPreviousAction, null); - this.mediaRewindAction = new global::Gtk.Action ("mediaRewindAction", null, null, "gtk-media-rewind"); - w2.Add (this.mediaRewindAction, null); - this.mediaForwardAction = new global::Gtk.Action ("mediaForwardAction", null, null, "gtk-media-forward"); - w2.Add (this.mediaForwardAction, null); - this.mediaNextAction = new global::Gtk.Action ("mediaNextAction", null, null, "gtk-media-next"); - w2.Add (this.mediaNextAction, null); - this.actAddFile = new global::Gtk.Action ("actAddFile", null, null, "gtk-add"); - w2.Add (this.actAddFile, null); - this.actDelFile = new global::Gtk.Action ("actDelFile", null, null, "gtk-remove"); - w2.Add (this.actDelFile, null); - this.preferencesAction = new global::Gtk.Action ("preferencesAction", null, null, "gtk-preferences"); - w2.Add (this.preferencesAction, null); - this.closeAction1 = new global::Gtk.Action ("closeAction1", null, null, "gtk-close"); - w2.Add (this.closeAction1, null); - this.preferencesAction1 = new global::Gtk.Action ("preferencesAction1", null, null, "gtk-preferences"); - w2.Add (this.preferencesAction1, null); - this.UIManager.InsertActionGroup (w2, 0); + 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.Action("closeAction", null, null, "gtk-close"); + w2.Add(this.closeAction, null); + this.mediaPlayAction = new global::Gtk.Action("mediaPlayAction", null, null, "gtk-media-play"); + w2.Add(this.mediaPlayAction, null); + this.mediaPauseAction = new global::Gtk.Action("mediaPauseAction", null, null, "gtk-media-pause"); + w2.Add(this.mediaPauseAction, null); + this.mediaStopAction = new global::Gtk.Action("mediaStopAction", null, null, "gtk-media-stop"); + w2.Add(this.mediaStopAction, null); + this.mediaPreviousAction = new global::Gtk.Action("mediaPreviousAction", null, null, "gtk-media-previous"); + w2.Add(this.mediaPreviousAction, null); + this.mediaRewindAction = new global::Gtk.Action("mediaRewindAction", null, null, "gtk-media-rewind"); + w2.Add(this.mediaRewindAction, null); + this.mediaForwardAction = new global::Gtk.Action("mediaForwardAction", null, null, "gtk-media-forward"); + w2.Add(this.mediaForwardAction, null); + this.mediaNextAction = new global::Gtk.Action("mediaNextAction", null, null, "gtk-media-next"); + w2.Add(this.mediaNextAction, null); + this.actAddFile = new global::Gtk.Action("actAddFile", null, null, "gtk-add"); + w2.Add(this.actAddFile, null); + this.actDelFile = new global::Gtk.Action("actDelFile", null, null, "gtk-remove"); + w2.Add(this.actDelFile, null); + this.preferencesAction = new global::Gtk.Action("preferencesAction", null, null, "gtk-preferences"); + w2.Add(this.preferencesAction, null); + this.closeAction1 = new global::Gtk.Action("closeAction1", null, null, "gtk-close"); + w2.Add(this.closeAction1, null); + this.preferencesAction1 = new global::Gtk.Action("preferencesAction1", null, null, "gtk-preferences"); + w2.Add(this.preferencesAction1, null); + this.UIManager.InsertActionGroup(w2, 0); this.Name = "DMX2.SeqSonUI"; // Container child DMX2.SeqSonUI.Gtk.Container+ContainerChild - this.frame1 = new global::Gtk.Frame (); + 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 = new global::Gtk.Alignment(0F, 0F, 1F, 1F); this.GtkAlignment.Name = "GtkAlignment"; this.GtkAlignment.LeftPadding = ((uint)(12)); // Container child GtkAlignment.Gtk.Container+ContainerChild - this.vbox2 = new global::Gtk.VBox (); + 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 = 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 = new global::Gtk.VBox(); this.vbox3.Name = "vbox3"; this.vbox3.Spacing = 6; // Container child vbox3.Gtk.Box+BoxChild - this.evBBox = new global::Gtk.EventBox (); + this.evBBox = new global::Gtk.EventBox(); this.evBBox.Name = "evBBox"; // Container child evBBox.Gtk.Container+ContainerChild - this.hbox2 = new global::Gtk.HBox (); + 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 = new global::Gtk.Label(); this.posLabel.HeightRequest = 33; this.posLabel.Name = "posLabel"; this.posLabel.Xpad = 15; this.posLabel.Xalign = 0F; this.posLabel.LabelProp = "n° 0"; this.posLabel.UseMarkup = true; - this.hbox2.Add (this.posLabel); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.posLabel])); + 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.titleLabel = new global::Gtk.Label (); + this.titleLabel = new global::Gtk.Label(); this.titleLabel.Name = "titleLabel"; this.titleLabel.UseMarkup = true; this.titleLabel.Wrap = true; - this.hbox2.Add (this.titleLabel); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.titleLabel])); + this.hbox2.Add(this.titleLabel); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.titleLabel])); w4.Position = 1; w4.Fill = false; // Container child hbox2.Gtk.Box+BoxChild - this.timeLabel = new global::Gtk.Label (); + this.timeLabel = new global::Gtk.Label(); this.timeLabel.HeightRequest = 33; this.timeLabel.Name = "timeLabel"; this.timeLabel.Xpad = 15; this.timeLabel.LabelProp = "00.0"; this.timeLabel.UseMarkup = true; this.timeLabel.Justify = ((global::Gtk.Justification)(1)); - this.hbox2.Add (this.timeLabel); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.timeLabel])); + 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])); + 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.pbCur = new global::Gtk.ProgressBar (); + this.pbCur = new global::Gtk.ProgressBar(); this.pbCur.Name = "pbCur"; - this.vbox3.Add (this.pbCur); - global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.pbCur])); + this.vbox3.Add(this.pbCur); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.pbCur])); w8.Position = 1; w8.Expand = false; w8.Fill = false; // Container child vbox3.Gtk.Box+BoxChild - this.hbox3 = new global::Gtk.HBox (); + this.hbox3 = new global::Gtk.HBox(); this.hbox3.Name = "hbox3"; this.hbox3.Spacing = 6; // Container child hbox3.Gtk.Box+BoxChild - this.btnPlay = new global::Gtk.Button (); + this.btnPlay = new global::Gtk.Button(); this.btnPlay.CanFocus = true; this.btnPlay.Name = "btnPlay"; this.btnPlay.UseUnderline = true; - // Container child btnPlay.Gtk.Container+ContainerChild - global::Gtk.Alignment w9 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w10 = new global::Gtk.HBox (); - w10.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w11 = new global::Gtk.Image (); - w11.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-play", global::Gtk.IconSize.Button); - w10.Add (w11); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w13 = new global::Gtk.Label (); - w10.Add (w13); - w9.Add (w10); - this.btnPlay.Add (w9); - this.hbox3.Add (this.btnPlay); - global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnPlay])); - w17.Position = 0; - w17.Expand = false; - w17.Fill = false; + global::Gtk.Image w9 = new global::Gtk.Image(); + w9.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-media-play", global::Gtk.IconSize.Button); + this.btnPlay.Image = w9; + this.hbox3.Add(this.btnPlay); + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btnPlay])); + w10.Position = 0; + w10.Expand = false; + w10.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.btnPause = new global::Gtk.Button (); + this.btnPause = new global::Gtk.Button(); this.btnPause.CanFocus = true; this.btnPause.Name = "btnPause"; this.btnPause.UseUnderline = true; - // Container child btnPause.Gtk.Container+ContainerChild - global::Gtk.Alignment w18 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w19 = new global::Gtk.HBox (); - w19.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w20 = new global::Gtk.Image (); - w20.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-pause", global::Gtk.IconSize.Button); - w19.Add (w20); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w22 = new global::Gtk.Label (); - w19.Add (w22); - w18.Add (w19); - this.btnPause.Add (w18); - this.hbox3.Add (this.btnPause); - global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnPause])); - w26.Position = 1; - w26.Expand = false; - w26.Fill = false; + global::Gtk.Image w11 = new global::Gtk.Image(); + w11.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-media-pause", global::Gtk.IconSize.Button); + this.btnPause.Image = w11; + this.hbox3.Add(this.btnPause); + global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btnPause])); + w12.Position = 1; + w12.Expand = false; + w12.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.btnStop = new global::Gtk.Button (); + this.btnStop = new global::Gtk.Button(); this.btnStop.CanFocus = true; this.btnStop.Name = "btnStop"; this.btnStop.UseUnderline = true; - // Container child btnStop.Gtk.Container+ContainerChild - global::Gtk.Alignment w27 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w28 = new global::Gtk.HBox (); - w28.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w29 = new global::Gtk.Image (); - w29.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-stop", global::Gtk.IconSize.Button); - w28.Add (w29); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w31 = new global::Gtk.Label (); - w28.Add (w31); - w27.Add (w28); - this.btnStop.Add (w27); - this.hbox3.Add (this.btnStop); - global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnStop])); - w35.Position = 2; - w35.Expand = false; - w35.Fill = false; + global::Gtk.Image w13 = new global::Gtk.Image(); + w13.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-media-stop", global::Gtk.IconSize.Button); + this.btnStop.Image = w13; + this.hbox3.Add(this.btnStop); + global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btnStop])); + w14.Position = 2; + w14.Expand = false; + w14.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.btnPrev = new global::Gtk.Button (); + this.btnPrev = new global::Gtk.Button(); this.btnPrev.CanFocus = true; this.btnPrev.Name = "btnPrev"; this.btnPrev.UseUnderline = true; - // Container child btnPrev.Gtk.Container+ContainerChild - global::Gtk.Alignment w36 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w37 = new global::Gtk.HBox (); - w37.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w38 = new global::Gtk.Image (); - w38.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-previous", global::Gtk.IconSize.Button); - w37.Add (w38); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w40 = new global::Gtk.Label (); - w37.Add (w40); - w36.Add (w37); - this.btnPrev.Add (w36); - this.hbox3.Add (this.btnPrev); - global::Gtk.Box.BoxChild w44 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnPrev])); - w44.Position = 3; - w44.Expand = false; - w44.Fill = false; + global::Gtk.Image w15 = new global::Gtk.Image(); + w15.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-media-previous", global::Gtk.IconSize.Button); + this.btnPrev.Image = w15; + this.hbox3.Add(this.btnPrev); + global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btnPrev])); + w16.Position = 3; + w16.Expand = false; + w16.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.btnRewind = new global::Gtk.Button (); + this.btnRewind = new global::Gtk.Button(); this.btnRewind.CanFocus = true; this.btnRewind.Name = "btnRewind"; this.btnRewind.UseUnderline = true; - // Container child btnRewind.Gtk.Container+ContainerChild - global::Gtk.Alignment w45 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w46 = new global::Gtk.HBox (); - w46.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w47 = new global::Gtk.Image (); - w47.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-rewind", global::Gtk.IconSize.Button); - w46.Add (w47); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w49 = new global::Gtk.Label (); - w46.Add (w49); - w45.Add (w46); - this.btnRewind.Add (w45); - this.hbox3.Add (this.btnRewind); - global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnRewind])); - w53.Position = 4; - w53.Expand = false; - w53.Fill = false; + global::Gtk.Image w17 = new global::Gtk.Image(); + w17.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-media-rewind", global::Gtk.IconSize.Button); + this.btnRewind.Image = w17; + this.hbox3.Add(this.btnRewind); + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btnRewind])); + w18.Position = 4; + w18.Expand = false; + w18.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.btnForward = new global::Gtk.Button (); + this.btnForward = new global::Gtk.Button(); this.btnForward.CanFocus = true; this.btnForward.Name = "btnForward"; this.btnForward.UseUnderline = true; - // Container child btnForward.Gtk.Container+ContainerChild - global::Gtk.Alignment w54 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w55 = new global::Gtk.HBox (); - w55.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w56 = new global::Gtk.Image (); - w56.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-forward", global::Gtk.IconSize.Button); - w55.Add (w56); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w58 = new global::Gtk.Label (); - w55.Add (w58); - w54.Add (w55); - this.btnForward.Add (w54); - this.hbox3.Add (this.btnForward); - global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnForward])); - w62.Position = 5; - w62.Expand = false; - w62.Fill = false; + global::Gtk.Image w19 = new global::Gtk.Image(); + w19.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-media-forward", global::Gtk.IconSize.Button); + this.btnForward.Image = w19; + this.hbox3.Add(this.btnForward); + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btnForward])); + w20.Position = 5; + w20.Expand = false; + w20.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.btnNext = new global::Gtk.Button (); + this.btnNext = new global::Gtk.Button(); this.btnNext.CanFocus = true; this.btnNext.Name = "btnNext"; this.btnNext.UseUnderline = true; - // Container child btnNext.Gtk.Container+ContainerChild - global::Gtk.Alignment w63 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w64 = new global::Gtk.HBox (); - w64.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w65 = new global::Gtk.Image (); - w65.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-next", global::Gtk.IconSize.Button); - w64.Add (w65); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w67 = new global::Gtk.Label (); - w64.Add (w67); - w63.Add (w64); - this.btnNext.Add (w63); - this.hbox3.Add (this.btnNext); - global::Gtk.Box.BoxChild w71 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnNext])); - w71.Position = 6; - w71.Expand = false; - w71.Fill = false; + global::Gtk.Image w21 = new global::Gtk.Image(); + w21.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-media-next", global::Gtk.IconSize.Button); + this.btnNext.Image = w21; + this.hbox3.Add(this.btnNext); + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btnNext])); + w22.Position = 6; + w22.Expand = false; + w22.Fill = false; // Container child hbox3.Gtk.Box+BoxChild - this.txtGoto = new global::Gtk.Entry (); + this.txtGoto = new global::Gtk.Entry(); this.txtGoto.CanFocus = true; this.txtGoto.Name = "txtGoto"; this.txtGoto.IsEditable = true; this.txtGoto.InvisibleChar = '•'; - this.hbox3.Add (this.txtGoto); - global::Gtk.Box.BoxChild w72 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.txtGoto])); - w72.Position = 7; + this.hbox3.Add(this.txtGoto); + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.txtGoto])); + w23.Position = 7; // Container child hbox3.Gtk.Box+BoxChild - this.btnGoto = new global::Gtk.Button (); + this.btnGoto = new global::Gtk.Button(); this.btnGoto.CanFocus = true; this.btnGoto.Name = "btnGoto"; this.btnGoto.UseUnderline = true; this.btnGoto.Label = "Cmd"; - this.hbox3.Add (this.btnGoto); - global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnGoto])); - w73.Position = 8; - w73.Expand = false; - w73.Fill = false; - this.vbox3.Add (this.hbox3); - global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox3])); - w74.Position = 2; - w74.Expand = false; - w74.Fill = false; - this.hbox1.Add (this.vbox3); - global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3])); - w75.Position = 0; + this.hbox3.Add(this.btnGoto); + global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.btnGoto])); + w24.Position = 8; + w24.Expand = false; + w24.Fill = false; + this.vbox3.Add(this.hbox3); + global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox3])); + w25.Position = 2; + w25.Expand = false; + w25.Fill = false; + this.hbox1.Add(this.vbox3); + global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox3])); + w26.Position = 0; // Container child hbox1.Gtk.Box+BoxChild - this.sclVolume = new global::Gtk.VScale (null); + this.sclVolume = new global::Gtk.VScale(null); this.sclVolume.WidthRequest = 20; this.sclVolume.CanFocus = true; this.sclVolume.Name = "sclVolume"; this.sclVolume.Inverted = true; - this.sclVolume.Adjustment.Upper = 100; - this.sclVolume.Adjustment.PageIncrement = 10; - this.sclVolume.Adjustment.StepIncrement = 1; - this.sclVolume.Adjustment.Value = 100; + this.sclVolume.Adjustment.Upper = 100D; + this.sclVolume.Adjustment.PageIncrement = 10D; + this.sclVolume.Adjustment.StepIncrement = 1D; + this.sclVolume.Adjustment.Value = 100D; this.sclVolume.DrawValue = true; this.sclVolume.Digits = 0; this.sclVolume.ValuePos = ((global::Gtk.PositionType)(3)); - this.hbox1.Add (this.sclVolume); - global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.sclVolume])); - w76.Position = 1; - w76.Expand = false; - w76.Fill = false; + this.hbox1.Add(this.sclVolume); + global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.sclVolume])); + w27.Position = 1; + w27.Expand = false; + w27.Fill = false; // Container child hbox1.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); - this.toolbar4 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar4"))); + this.UIManager.AddUiFromString(""); + this.toolbar4 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar4"))); this.toolbar4.Name = "toolbar4"; this.toolbar4.Orientation = ((global::Gtk.Orientation)(1)); this.toolbar4.ShowArrow = false; this.toolbar4.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.toolbar4.IconSize = ((global::Gtk.IconSize)(2)); - this.hbox1.Add (this.toolbar4); - global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar4])); - w77.Position = 2; - w77.Expand = false; - w77.Fill = false; - this.vbox2.Add (this.hbox1); - global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1])); - w78.Position = 0; - w78.Expand = false; - w78.Fill = false; + this.hbox1.Add(this.toolbar4); + global::Gtk.Box.BoxChild w28 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.toolbar4])); + w28.Position = 2; + w28.Expand = false; + w28.Fill = false; + this.vbox2.Add(this.hbox1); + global::Gtk.Box.BoxChild w29 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); + w29.Position = 0; + w29.Expand = false; + w29.Fill = false; // Container child vbox2.Gtk.Box+BoxChild - this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - this.listFiles = new global::Gtk.NodeView (); + this.listFiles = new global::Gtk.NodeView(); this.listFiles.CanFocus = true; this.listFiles.Name = "listFiles"; this.listFiles.RulesHint = true; - this.GtkScrolledWindow.Add (this.listFiles); - this.vbox2.Add (this.GtkScrolledWindow); - global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow])); - w80.Position = 1; + this.GtkScrolledWindow.Add(this.listFiles); + this.vbox2.Add(this.GtkScrolledWindow); + global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow])); + w31.Position = 1; // Container child vbox2.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label (); + this.label1 = new global::Gtk.Label(); this.label1.Name = "label1"; this.label1.Xalign = 0F; - this.label1.LabelProp = "Commands : \n[XX][gMM:SS.f][vVOL,T][p|ps|s]\n(FileNumber)(g=goto)(v=volume,fade in/out time)(p=play,ps=pause,s=stop)"; + this.label1.LabelProp = "Commands : \n[XX][gMM:SS.f][vVOL,T][p|ps|s]\n(FileNumber)(g=goto)(v=volume,fade in/" + + "out time)(p=play,ps=pause,s=stop)"; this.label1.UseMarkup = true; - this.vbox2.Add (this.label1); - global::Gtk.Box.BoxChild w81 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.label1])); - w81.Position = 2; - w81.Expand = false; - w81.Fill = false; - this.GtkAlignment.Add (this.vbox2); - this.frame1.Add (this.GtkAlignment); - this.titreLabel = new global::Gtk.Label (); + this.vbox2.Add(this.label1); + global::Gtk.Box.BoxChild w32 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.label1])); + w32.Position = 2; + w32.Expand = false; + w32.Fill = false; + this.GtkAlignment.Add(this.vbox2); + this.frame1.Add(this.GtkAlignment); + this.titreLabel = new global::Gtk.Label(); this.titreLabel.Name = "titreLabel"; this.titreLabel.LabelProp = "Sequenceur Son"; this.titreLabel.UseMarkup = true; this.frame1.LabelWidget = this.titreLabel; - this.Add (this.frame1); - if ((this.Child != null)) { - this.Child.ShowAll (); + this.Add(this.frame1); + if ((this.Child != null)) + { + this.Child.ShowAll(); } - w1.SetUiManager (UIManager); - this.Hide (); - this.actAddFile.Activated += new global::System.EventHandler (this.OnActAddFileActivated); - this.actDelFile.Activated += new global::System.EventHandler (this.OnActDelFileActivated); - this.btnPlay.Clicked += new global::System.EventHandler (this.OnBtnPlayClicked); - this.btnPause.Clicked += new global::System.EventHandler (this.OnBtnPauseClicked); - this.btnStop.Clicked += new global::System.EventHandler (this.OnBtnStopClicked); - this.btnPrev.Clicked += new global::System.EventHandler (this.OnBtnPrevClicked); - this.btnRewind.Pressed += new global::System.EventHandler (this.OnBtnRewindPressed); - this.btnRewind.Released += new global::System.EventHandler (this.OnBtnRewindReleased); - this.btnForward.Pressed += new global::System.EventHandler (this.OnBtnForwardPressed); - this.btnForward.Released += new global::System.EventHandler (this.OnBtnForwardReleased); - this.btnNext.Clicked += new global::System.EventHandler (this.OnBtnNextClicked); - this.btnGoto.Clicked += new global::System.EventHandler (this.OnBtnGotoClicked); - this.sclVolume.ValueChanged += new global::System.EventHandler (this.OnSclVolumeValueChanged); - this.listFiles.CursorChanged += new global::System.EventHandler (this.OnListFilesCursorChanged); + w1.SetUiManager(UIManager); + this.Hide(); + this.actAddFile.Activated += new global::System.EventHandler(this.OnActAddFileActivated); + this.actDelFile.Activated += new global::System.EventHandler(this.OnActDelFileActivated); + this.btnPlay.Clicked += new global::System.EventHandler(this.OnBtnPlayClicked); + this.btnPause.Clicked += new global::System.EventHandler(this.OnBtnPauseClicked); + this.btnStop.Clicked += new global::System.EventHandler(this.OnBtnStopClicked); + this.btnPrev.Clicked += new global::System.EventHandler(this.OnBtnPrevClicked); + this.btnRewind.Pressed += new global::System.EventHandler(this.OnBtnRewindPressed); + this.btnRewind.Released += new global::System.EventHandler(this.OnBtnRewindReleased); + this.btnForward.Pressed += new global::System.EventHandler(this.OnBtnForwardPressed); + this.btnForward.Released += new global::System.EventHandler(this.OnBtnForwardReleased); + this.btnNext.Clicked += new global::System.EventHandler(this.OnBtnNextClicked); + this.btnGoto.Clicked += new global::System.EventHandler(this.OnBtnGotoClicked); + this.sclVolume.ValueChanged += new global::System.EventHandler(this.OnSclVolumeValueChanged); + this.listFiles.CursorChanged += new global::System.EventHandler(this.OnListFilesCursorChanged); } } } diff --git a/DMX-2.0/gtk-gui/generated.cs b/DMX-2.0/gtk-gui/generated.cs index e859413..19494a5 100644 --- a/DMX-2.0/gtk-gui/generated.cs +++ b/DMX-2.0/gtk-gui/generated.cs @@ -6,112 +6,124 @@ namespace Stetic { private static bool initialized; - internal static void Initialize (Gtk.Widget iconRenderer) + internal static void Initialize(Gtk.Widget iconRenderer) { - if ((Stetic.Gui.initialized == false)) { + if ((Stetic.Gui.initialized == false)) + { Stetic.Gui.initialized = true; - global::Gtk.IconFactory w1 = new global::Gtk.IconFactory (); - global::Gtk.IconSet w2 = new global::Gtk.IconSet (); - global::Gtk.IconSource w3 = new global::Gtk.IconSource (); - w3.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.ictir.16.png"); + global::Gtk.IconFactory w1 = new global::Gtk.IconFactory(); + global::Gtk.IconSet w2 = new global::Gtk.IconSet(); + global::Gtk.IconSource w3 = new global::Gtk.IconSource(); + w3.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.ictir.16.png"); w3.SizeWildcarded = false; w3.Size = global::Gtk.IconSize.SmallToolbar; - w2.AddSource (w3); - global::Gtk.IconSource w4 = new global::Gtk.IconSource (); - w4.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.ictir.24.png"); + w2.AddSource(w3); + global::Gtk.IconSource w4 = new global::Gtk.IconSource(); + w4.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.ictir.24.png"); w4.SizeWildcarded = false; w4.Size = global::Gtk.IconSize.LargeToolbar; - w2.AddSource (w4); - global::Gtk.IconSource w5 = new global::Gtk.IconSource (); - w5.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.ictir.32.png"); + w2.AddSource(w4); + global::Gtk.IconSource w5 = new global::Gtk.IconSource(); + w5.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.ictir.32.png"); w5.SizeWildcarded = false; w5.Size = global::Gtk.IconSize.Dnd; - w2.AddSource (w5); - global::Gtk.IconSource w6 = new global::Gtk.IconSource (); - w6.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.ictir.48.png"); + w2.AddSource(w5); + global::Gtk.IconSource w6 = new global::Gtk.IconSource(); + w6.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.ictir.48.png"); w6.SizeWildcarded = false; w6.Size = global::Gtk.IconSize.Dialog; - w2.AddSource (w6); - global::Gtk.IconSource w7 = new global::Gtk.IconSource (); - w7.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.ictir.16.png"); + w2.AddSource(w6); + global::Gtk.IconSource w7 = new global::Gtk.IconSource(); + w7.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.ictir.16.png"); w7.SizeWildcarded = false; w7.Size = global::Gtk.IconSize.Button; - w2.AddSource (w7); - global::Gtk.IconSource w8 = new global::Gtk.IconSource (); - w8.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.ictir.16.png"); + w2.AddSource(w7); + global::Gtk.IconSource w8 = new global::Gtk.IconSource(); + w8.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.ictir.16.png"); w8.SizeWildcarded = false; w8.Size = global::Gtk.IconSize.Menu; - w2.AddSource (w8); - w1.Add ("tirettes", w2); - global::Gtk.IconSet w9 = new global::Gtk.IconSet (); - global::Gtk.IconSource w10 = new global::Gtk.IconSource (); - w10.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.docListe.16.png"); + w2.AddSource(w8); + w1.Add("tirettes", w2); + global::Gtk.IconSet w9 = new global::Gtk.IconSet(); + global::Gtk.IconSource w10 = new global::Gtk.IconSource(); + w10.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.docListe.16.png"); w10.SizeWildcarded = false; w10.Size = global::Gtk.IconSize.Menu; - w9.AddSource (w10); - global::Gtk.IconSource w11 = new global::Gtk.IconSource (); - w11.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.docListe.48.png"); + w9.AddSource(w10); + global::Gtk.IconSource w11 = new global::Gtk.IconSource(); + w11.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.docListe.48.png"); w11.SizeWildcarded = false; w11.Size = global::Gtk.IconSize.Dialog; - w9.AddSource (w11); - global::Gtk.IconSource w12 = new global::Gtk.IconSource (); - w12.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.docListe.16.png"); + w9.AddSource(w11); + global::Gtk.IconSource w12 = new global::Gtk.IconSource(); + w12.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.docListe.16.png"); w12.SizeWildcarded = false; w12.Size = global::Gtk.IconSize.Button; - w9.AddSource (w12); - global::Gtk.IconSource w13 = new global::Gtk.IconSource (); - w13.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.docListe.24.png"); + w9.AddSource(w12); + global::Gtk.IconSource w13 = new global::Gtk.IconSource(); + w13.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.docListe.24.png"); w13.SizeWildcarded = false; w13.Size = global::Gtk.IconSize.LargeToolbar; - w9.AddSource (w13); - global::Gtk.IconSource w14 = new global::Gtk.IconSource (); - w14.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.docListe.16.png"); + w9.AddSource(w13); + global::Gtk.IconSource w14 = new global::Gtk.IconSource(); + w14.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.docListe.16.png"); w14.SizeWildcarded = false; w14.Size = global::Gtk.IconSize.SmallToolbar; - w9.AddSource (w14); - global::Gtk.IconSource w15 = new global::Gtk.IconSource (); - w15.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("DMX2.icons.docListe.32.png"); + w9.AddSource(w14); + global::Gtk.IconSource w15 = new global::Gtk.IconSource(); + w15.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.docListe.32.png"); w15.SizeWildcarded = false; w15.Size = global::Gtk.IconSize.Dnd; - w9.AddSource (w15); - w1.Add ("circuits", w9); - w1.AddDefault (); + w9.AddSource(w15); + w1.Add("circuits", w9); + global::Gtk.IconSet w16 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("DMX2.icons.midiseq.audio-x-generic.svg")); + w1.Add("MidiSeq", w16); + w1.AddDefault(); } } } internal class IconLoader { - public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size) + public static Gdk.Pixbuf LoadIcon(Gtk.Widget widget, string name, Gtk.IconSize size) { - Gdk.Pixbuf res = widget.RenderIcon (name, size, null); - if ((res != null)) { + Gdk.Pixbuf res = widget.RenderIcon(name, size, null); + if ((res != null)) + { return res; - } else { + } + else + { int sz; int sy; - global::Gtk.Icon.SizeLookup (size, out sz, out sy); - try { - return Gtk.IconTheme.Default.LoadIcon (name, sz, 0); - } catch (System.Exception) { - if ((name != "gtk-missing-image")) { - return Stetic.IconLoader.LoadIcon (widget, "gtk-missing-image", size); - } else { - Gdk.Pixmap pmap = new Gdk.Pixmap (Gdk.Screen.Default.RootWindow, sz, sz); - Gdk.GC gc = new Gdk.GC (pmap); - gc.RgbFgColor = new Gdk.Color (255, 255, 255); - pmap.DrawRectangle (gc, true, 0, 0, sz, sz); - gc.RgbFgColor = new Gdk.Color (0, 0, 0); - pmap.DrawRectangle (gc, false, 0, 0, (sz - 1), (sz - 1)); - gc.SetLineAttributes (3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round); - gc.RgbFgColor = new Gdk.Color (255, 0, 0); - pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1) - - (sz / 4)), ((sz - 1) - - (sz / 4))); - pmap.DrawLine (gc, ((sz - 1) - - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - - (sz / 4))); - return Gdk.Pixbuf.FromDrawable (pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz); + global::Gtk.Icon.SizeLookup(size, out sz, out sy); + try + { + return Gtk.IconTheme.Default.LoadIcon(name, sz, 0); + } + catch (System.Exception) + { + if ((name != "gtk-missing-image")) + { + return Stetic.IconLoader.LoadIcon(widget, "gtk-missing-image", size); + } + else + { + Gdk.Pixmap pmap = new Gdk.Pixmap(Gdk.Screen.Default.RootWindow, sz, sz); + Gdk.GC gc = new Gdk.GC(pmap); + gc.RgbFgColor = new Gdk.Color(255, 255, 255); + pmap.DrawRectangle(gc, true, 0, 0, sz, sz); + gc.RgbFgColor = new Gdk.Color(0, 0, 0); + pmap.DrawRectangle(gc, false, 0, 0, (sz - 1), (sz - 1)); + gc.SetLineAttributes(3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round); + gc.RgbFgColor = new Gdk.Color(255, 0, 0); + pmap.DrawLine(gc, (sz / 4), (sz / 4), ((sz - 1) + - (sz / 4)), ((sz - 1) + - (sz / 4))); + pmap.DrawLine(gc, ((sz - 1) + - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) + - (sz / 4))); + return Gdk.Pixbuf.FromDrawable(pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz); } } } @@ -121,51 +133,55 @@ namespace Stetic internal class BinContainer { private Gtk.Widget child; - + private Gtk.UIManager uimanager; - public static BinContainer Attach (Gtk.Bin bin) + public static BinContainer Attach(Gtk.Bin bin) { - BinContainer bc = new BinContainer (); - bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested); - bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated); - bin.Added += new Gtk.AddedHandler (bc.OnAdded); + BinContainer bc = new BinContainer(); + bin.SizeRequested += new Gtk.SizeRequestedHandler(bc.OnSizeRequested); + bin.SizeAllocated += new Gtk.SizeAllocatedHandler(bc.OnSizeAllocated); + bin.Added += new Gtk.AddedHandler(bc.OnAdded); return bc; } - private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args) + private void OnSizeRequested(object sender, Gtk.SizeRequestedArgs args) { - if ((this.child != null)) { - args.Requisition = this.child.SizeRequest (); + if ((this.child != null)) + { + args.Requisition = this.child.SizeRequest(); } } - private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args) + private void OnSizeAllocated(object sender, Gtk.SizeAllocatedArgs args) { - if ((this.child != null)) { + if ((this.child != null)) + { this.child.Allocation = args.Allocation; } } - private void OnAdded (object sender, Gtk.AddedArgs args) + private void OnAdded(object sender, Gtk.AddedArgs args) { this.child = args.Widget; } - public void SetUiManager (Gtk.UIManager uim) + public void SetUiManager(Gtk.UIManager uim) { this.uimanager = uim; - this.child.Realized += new System.EventHandler (this.OnRealized); + this.child.Realized += new System.EventHandler(this.OnRealized); } - private void OnRealized (object sender, System.EventArgs args) + private void OnRealized(object sender, System.EventArgs args) { - if ((this.uimanager != null)) { + if ((this.uimanager != null)) + { Gtk.Widget w; w = this.child.Toplevel; if (((w != null) - && typeof(Gtk.Window).IsInstanceOfType (w))) { - ((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup); + && typeof(Gtk.Window).IsInstanceOfType(w))) + { + ((Gtk.Window)(w)).AddAccelGroup(this.uimanager.AccelGroup); this.uimanager = null; } } @@ -174,12 +190,12 @@ namespace Stetic internal class ActionGroups { - public static Gtk.ActionGroup GetActionGroup (System.Type type) + public static Gtk.ActionGroup GetActionGroup(System.Type type) { - return Stetic.ActionGroups.GetActionGroup (type.FullName); + return Stetic.ActionGroups.GetActionGroup(type.FullName); } - public static Gtk.ActionGroup GetActionGroup (string name) + public static Gtk.ActionGroup GetActionGroup(string name) { return null; } diff --git a/DMX-2.0/gtk-gui/gui.stetic b/DMX-2.0/gtk-gui/gui.stetic index 1303625..cd2d6e5 100644 --- a/DMX-2.0/gtk-gui/gui.stetic +++ b/DMX-2.0/gtk-gui/gui.stetic @@ -60,6 +60,11 @@ Dnd + + + resource:DMX2.icons.midiseq.audio-x-generic.svg + + @@ -233,11 +238,15 @@ gtk-select-color False - False - False - False + + Action + + False + MidiSeq + + MainWindow @@ -623,6 +632,7 @@ page + @@ -757,7 +767,7 @@ page - + 10 5 @@ -1167,7 +1177,7 @@ au sequenceur - + 6 Start @@ -1358,7 +1368,7 @@ au sequenceur 6 - + Univers : @@ -2011,6 +2021,564 @@ au sequenceur + + + + Toggle + + + gtk-close + False + False + + + + Action + + gtk-go-forward + + + + Action + + gtk-go-back + + + + Action + + gtk-media-pause + + + + Action + + gtk-media-next + + + Action + + gtk-add + + + + Action + + gtk-remove + + + + Action + + + + + False + + + + In + + + + 0 + 0 + 12 + + + + + + + 6 + + + + 6 + + + + + + + + + + 300 + 6 + + + + + 33 + 15 + 0 + <big>n° 0</big> + True + + + 0 + True + False + False + + + + + + True + True + + + 1 + False + False + + + + + + 33 + 15 + <big>00.0</big> + True + + + End + 2 + False + False + False + + + + + + + 0 + True + False + False + + + + + + 6 + + + + label1 + + + 0 + True + False + False + + + + + + True + + + + 1 + False + + + + + + label2 + + + 2 + True + False + False + + + + + 1 + False + + + + + + False + Icons + SmallToolbar + + + + + + + + + + + 2 + True + False + False + + + + + 0 + False + + + + + + Vertical + False + Icons + SmallToolbar + + + + + + End + 1 + True + False + False + + + + + 0 + True + False + False + + + + + + True + In + + + + True + True + + + + + + 1 + True + + + + + + 0 + CC : Control Change (ex: CC12,100) +PC : Program Change (ex: PC5) +N : Note On/Off (ex: N64+127 ou N12-) +GT : Go To (ex: GT4) +r: loop + True + + + 2 + True + False + False + + + + + + + + + + + + Séquenceur Midi + True + + + label_item + + + + + + + + + Toggle + + + gtk-close + False + False + + + + Action + + gtk-go-forward + + + + Action + + gtk-go-back + + + + Action + + gtk-media-pause + + + + Action + + gtk-media-next + + + Action + + gtk-add + + + + Action + + gtk-remove + + + + Action + + + + + False + + + + In + + + + 0 + 0 + 12 + + + + + + + 6 + + + + 6 + + + + + + + + + + 300 + 6 + + + + + 33 + 15 + 0 + <big>n° 0</big> + True + + + 0 + True + False + False + + + + + + True + True + + + 1 + False + False + + + + + + 33 + 15 + <big>00.0</big> + True + + + End + 2 + False + False + False + + + + + + + 0 + True + False + False + + + + + + 6 + + + + False + Icons + SmallToolbar + + + + + + + + + + + 0 + True + + + + + + + + + 220 + True + True + + + + + 2 + False + False + False + + + + + 1 + True + False + False + + + + + 0 + False + + + + + + Vertical + False + Icons + SmallToolbar + + + + + + End + 1 + True + False + False + + + + + 0 + True + False + False + + + + + + True + In + + + + True + True + + + + + + 1 + True + + + + + + + + + + + + Séquenceur OSC + True + + + label_item + + + + + CenterOnParent @@ -2173,7 +2741,7 @@ au sequenceur 6 - + Driver Boitier V1 @@ -2325,7 +2893,7 @@ au sequenceur 6 - + Driver V2 @@ -2703,7 +3271,7 @@ au sequenceur 2 - + Loupiottes @@ -2750,7 +3318,7 @@ Licence : GPL V2 - + False @@ -2758,7 +3326,7 @@ Licence : GPL V2 6 - + Driver V3 @@ -3500,7 +4068,7 @@ trames DMX (ms) - + <b>Options Midi</b> True diff --git a/DMX-2.0/icons/midiseq/audio-x-generic.16.png b/DMX-2.0/icons/midiseq/audio-x-generic.16.png new file mode 100644 index 0000000..2bd5af9 Binary files /dev/null and b/DMX-2.0/icons/midiseq/audio-x-generic.16.png differ diff --git a/DMX-2.0/icons/midiseq/audio-x-generic.22.png b/DMX-2.0/icons/midiseq/audio-x-generic.22.png new file mode 100644 index 0000000..318bebd Binary files /dev/null and b/DMX-2.0/icons/midiseq/audio-x-generic.22.png differ diff --git a/DMX-2.0/icons/midiseq/audio-x-generic.24.png b/DMX-2.0/icons/midiseq/audio-x-generic.24.png new file mode 100644 index 0000000..da6c6c5 Binary files /dev/null and b/DMX-2.0/icons/midiseq/audio-x-generic.24.png differ diff --git a/DMX-2.0/icons/midiseq/audio-x-generic.32.png b/DMX-2.0/icons/midiseq/audio-x-generic.32.png new file mode 100644 index 0000000..c60b595 Binary files /dev/null and b/DMX-2.0/icons/midiseq/audio-x-generic.32.png differ diff --git a/DMX-2.0/icons/midiseq/audio-x-generic.svg b/DMX-2.0/icons/midiseq/audio-x-generic.svg new file mode 100644 index 0000000..be2d18a --- /dev/null +++ b/DMX-2.0/icons/midiseq/audio-x-generic.svg @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Generic Audio + + + Jakub Steiner + + + + + + + + + + + + + + + + + + + diff --git a/DMX-2.0/style.gtkrc b/DMX-2.0/style.gtkrc index e32ecd7..e72eff0 100644 --- a/DMX-2.0/style.gtkrc +++ b/DMX-2.0/style.gtkrc @@ -45,7 +45,7 @@ style "sombre" } GtkTreeView::odd-row-color = "#66666F" - #GtkTreeView::even-row-color = "#595959" + GtkTreeView::even-row-color = "#595959" } style "scale-s" = "sombre" { diff --git a/tools/gstlaunchdynamic.py b/tools/gstlaunchdynamic.py new file mode 100644 index 0000000..3936c41 --- /dev/null +++ b/tools/gstlaunchdynamic.py @@ -0,0 +1,157 @@ +#!/usr/bin/env python + +import sys + +import gi + +from gi.repository import GLib +gi.require_version('Gst', '1.0') +from gi.repository import Gst + +import fcntl +import os +import ast +import re + +# for the moment... +gst_eval = ast.literal_eval + +class Parser(object): + def __init__(self, pipeline): + self.pipeline = pipeline + + self.expressions = [ + ('^(\w+)\.(\w+) = (.+)$', self.set_property), + ('^(\w+)(?:\.(\w+))? ([-x])> (\w+)(?:\.(\w+))?$', self.link_pads), + ('^\+ (\w+)(?: (.*))?$', self.add_element), + ('^- (\w+)$', self.remove_element), + ('^(stop|play|pause)$', self.set_state), + ('^seekto ([0-9.]+)$', self.seek), + ] + + self.expressions = [ + (re.compile(regex), fn) + for regex, fn in self.expressions + ] + + def parse_line(self, line): + for regex, fn in self.expressions: + m = regex.match(line) + if m: + try: + fn(*m.groups()) + except Exception: + import traceback + traceback.print_exc() + break + else: + print 'Error: could not parse line.' + + def set_property(self, target, attr, value): + el = self.pipeline.get_by_name(target) + value = gst_eval(value) + el.set_property(attr, value) + + def link_pads(self, src, src_pad, char, dst, dst_pad): + src_el = self.pipeline.get_by_name(src) + dst_el = self.pipeline.get_by_name(dst) + + print src_el, src_pad, char, dst_el, dst_pad + + if char == '-': + success = src_el.link_pads(src_pad, dst_el, dst_pad) + if not success: + print 'Could not link pads.' + + elif char == 'x': + success = src_el.unlink_pads(src_pad, dst_el, dst_pad) + if not success: + print 'Could not unlink pads.' + + def set_state(self, state): + state = { + 'stop': Gst.State.READY, + 'play': Gst.State.PLAYING, + 'pause': Gst.State.PAUSED, + }[state] + self.pipeline.set_state(state) + + def seek(self, to): + to=int(float(to)*1000000000) + print to + pipeline.seek_simple( + Gst.Format.TIME, + Gst.SeekFlags.FLUSH | Gst.SeekFlags.KEY_UNIT, + to + ) + + def add_element(self, kind, properties): + # TODO: write a proper parser, and don't have this here + properties = dict( + pair.split('=', 1) + for pair in properties.split(' ') + ) + + # create the element + name = properties.pop('name', None) + element = Gst.ElementFactory.make(kind, name) + + # set the properties + for key, value in properties: + value = gst_eval(value) + element.set_property(key, value) + + self.pipeline.add(element) + + def remove_element(self, name): + element = self.pipeline.get_by_name(name) + self.pipeline.remove(element) + +def setup_non_blocking_read(f, on_line): + fd = f.fileno() + + fl = fcntl.fcntl(fd, fcntl.F_GETFL) + fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK) + + buf = [''] + def on_data_available(fd, condition): + data = f.read() + buf[0] += data + + lines = buf[0].split('\n') + buf[0] = lines.pop() + + for line in lines: + on_line(line) + + return True + + GLib.io_add_watch( + fd, + GLib.IOCondition.IN, + on_data_available, + ) + + +# init gstreamer, parse args +args = sys.argv[:] +Gst.init(args) + +desc = ' '.join(args[1:]) + +# load gstreamer pipeline, press play + +pipeline = Gst.parse_launch(desc) +pipeline.set_state(Gst.State.PLAYING) + +# make stdin non-blocking +# when a line of input is recieved, parse it +# the parser has most of the logic + +parser = Parser(pipeline) +setup_non_blocking_read(sys.stdin, parser.parse_line) + +# run glib main loop + +loop = GLib.MainLoop() +loop.run()