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

View file

@ -133,6 +133,13 @@ namespace DMX2
}
public static void Close ()
{
if(seq_handle==null) return;
seq_handle.Dispose();
seq_handle = null;
}
public static bool GetEvent(out snd_seq_event_t ev){
if(seq_handle==null) throw new InvalidOperationException();
@ -181,6 +188,7 @@ namespace DMX2
public static IEnumerable<Client> EnumClients ()
{
if(seq_handle==null) throw new InvalidOperationException();
using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) {
Invoke.snd_seq_client_info_set_client(clientInfo.Pointer, -1);
while (Invoke.snd_seq_query_next_client(seq_handle.Handle,clientInfo.Pointer)>=0) {
@ -191,6 +199,7 @@ namespace DMX2
public static Client GetClientByID (int client)
{
if(seq_handle==null) throw new InvalidOperationException();
using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) {
if (Invoke.snd_seq_get_any_client_info (seq_handle.Handle, client, clientInfo.Pointer) >= 0) {
return new Client (clientInfo);
@ -200,6 +209,7 @@ namespace DMX2
}
public static Port GetPortByIDs(int client,int port){
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);
@ -211,6 +221,7 @@ namespace DMX2
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;
@ -226,14 +237,17 @@ namespace DMX2
}
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;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -571,7 +571,7 @@ namespace DMX2
showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive =
seqLinAction.Sensitive = seqMacroAction.Sensitive = circAction.Sensitive = saveAction.Sensitive =
btnPause.Sensitive = btnBlackOut.Sensitive =
connectAction.Sensitive =
connectAction.Sensitive = midiAction.Sensitive =
saveAsAction.Sensitive = closeAction.Sensitive = true;
openAction.Sensitive = newAction.Sensitive = false;
@ -583,7 +583,7 @@ namespace DMX2
showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive =
seqLinAction.Sensitive = seqMacroAction.Sensitive = circAction.Sensitive = saveAction.Sensitive =
btnPause.Sensitive = btnBlackOut.Sensitive =
connectAction.Sensitive =
connectAction.Sensitive = midiAction.Sensitive =
saveAsAction.Sensitive = closeAction.Sensitive = false;
openAction.Sensitive = newAction.Sensitive = true;
@ -770,6 +770,7 @@ namespace DMX2
protected void OnMidiActionActivated (object sender, EventArgs e)
{
if(Conduite.Courante == null) return;
if (mDlg != null) {
mDlg.Show();
return;

View file

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

View file

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

View file

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

View file

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

View file

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