diff --git a/DMX-2.0/DriverBoitierV2.cs b/DMX-2.0/DriverBoitierV2.cs
index afac87a..1818856 100644
--- a/DMX-2.0/DriverBoitierV2.cs
+++ b/DMX-2.0/DriverBoitierV2.cs
@@ -29,13 +29,14 @@ namespace DMX2
// tampons Entrée/Sortie
- byte[] inputbuffer = new byte[1];
- byte[] outputbuffer = new byte[260];
+ public byte[] inputbuffer = new byte[532];
+ byte[] outputbuffer = new byte[514];
//Thread de boucle
Thread loopthread=null;
- public UniversDMX patch=null;
+ public UniversDMX patch1=null;
+ public UniversDMX patch2=null;
string portname = "";
SerialPort serial = null;
@@ -43,12 +44,8 @@ namespace DMX2
public DriverBoitierV2 (string serialport, string id): base(id)
{
portname = serialport;
- //patch = Conduite.Courante.Patches[0];
- //Start();
- //serial = serialport;
outputbuffer[0]=27;
outputbuffer[1]=68;
- outputbuffer[4]=255;
}
@@ -132,7 +129,7 @@ namespace DMX2
etat = etatAutomate.Erreur;
}
- if(patch!=null) patch.CalculUnivers(outputbuffer,5,255);
+ if(patch1!=null) patch1.CalculUnivers(outputbuffer,3,512);
serial.Write(outputbuffer,0,outputbuffer.Length);
diff --git a/DMX-2.0/DriverBoitierV2UI.cs b/DMX-2.0/DriverBoitierV2UI.cs
index e4249cf..41391eb 100644
--- a/DMX-2.0/DriverBoitierV2UI.cs
+++ b/DMX-2.0/DriverBoitierV2UI.cs
@@ -60,8 +60,21 @@ namespace DMX2
UniversDMX univers = tree_model.GetValue (iter, 0) as UniversDMX;
if(univers != null)
(cell as Gtk.CellRendererText).Text = univers.Nom;
+ }
+
+ protected void OnButton120Clicked (object sender, EventArgs e)
+ {
+ TreeIter iter;
+ if (cbUnivers1.GetActiveIter (out iter)) {
+ drv.patch1 = lsCbUnivers1.GetValue (iter, 0) as UniversDMX;
+ }
+ if (cbUnivers2.GetActiveIter (out iter)) {
+ drv.patch2 = lsCbUnivers2.GetValue (iter, 0) as UniversDMX;
+ }
+
}
+
}
}
diff --git a/DMX-2.0/GestionDriversUI.cs b/DMX-2.0/GestionDriversUI.cs
index 1a4d8f4..9f5b4cd 100644
--- a/DMX-2.0/GestionDriversUI.cs
+++ b/DMX-2.0/GestionDriversUI.cs
@@ -151,6 +151,11 @@ namespace DMX2
}
+ protected void OnBtnDisConnectClicked (object sender, EventArgs e)
+ {
+ //Dispose;
+ }
+
void AfficheDriverUI(DriverDMX drv){
btnConnect.Visible = false;
comboDriver.Sensitive = false;
diff --git a/DMX-2.0/gtk-gui/DMX2.DriverBoitierV2UI.cs b/DMX-2.0/gtk-gui/DMX2.DriverBoitierV2UI.cs
index 5ea537a..e121094 100644
--- a/DMX-2.0/gtk-gui/DMX2.DriverBoitierV2UI.cs
+++ b/DMX-2.0/gtk-gui/DMX2.DriverBoitierV2UI.cs
@@ -19,6 +19,8 @@ namespace DMX2
private global::Gtk.Label label5;
private global::Gtk.Label label6;
private global::Gtk.Label label7;
+ private global::Gtk.Label labVal;
+ private global::Gtk.Label labVerif;
private global::Gtk.HBox hbox1;
private global::Gtk.Button button120;
@@ -42,7 +44,7 @@ namespace DMX2
w1.Expand = false;
w1.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
- this.table1 = new global::Gtk.Table (((uint)(3)), ((uint)(4)), false);
+ this.table1 = new global::Gtk.Table (((uint)(4)), ((uint)(4)), false);
this.table1.Name = "table1";
this.table1.RowSpacing = ((uint)(6));
this.table1.ColumnSpacing = ((uint)(6));
@@ -182,11 +184,35 @@ namespace DMX2
w13.BottomAttach = ((uint)(3));
w13.XOptions = ((global::Gtk.AttachOptions)(4));
w13.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child table1.Gtk.Table+TableChild
+ this.labVal = new global::Gtk.Label ();
+ this.labVal.Name = "labVal";
+ this.labVal.LabelProp = "0";
+ this.table1.Add (this.labVal);
+ global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1 [this.labVal]));
+ w14.TopAttach = ((uint)(3));
+ w14.BottomAttach = ((uint)(4));
+ w14.LeftAttach = ((uint)(2));
+ w14.RightAttach = ((uint)(3));
+ w14.XOptions = ((global::Gtk.AttachOptions)(4));
+ w14.YOptions = ((global::Gtk.AttachOptions)(4));
+ // Container child table1.Gtk.Table+TableChild
+ this.labVerif = new global::Gtk.Label ();
+ this.labVerif.Name = "labVerif";
+ this.labVerif.LabelProp = "Vérif";
+ this.table1.Add (this.labVerif);
+ global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1 [this.labVerif]));
+ w15.TopAttach = ((uint)(3));
+ w15.BottomAttach = ((uint)(4));
+ w15.LeftAttach = ((uint)(1));
+ w15.RightAttach = ((uint)(2));
+ w15.XOptions = ((global::Gtk.AttachOptions)(4));
+ w15.YOptions = ((global::Gtk.AttachOptions)(4));
this.vbox2.Add (this.table1);
- global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1]));
- w14.Position = 1;
- w14.Expand = false;
- w14.Fill = false;
+ global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1]));
+ w16.Position = 1;
+ w16.Expand = false;
+ w16.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild
this.hbox1 = new global::Gtk.HBox ();
this.hbox1.Name = "hbox1";
@@ -198,21 +224,22 @@ namespace DMX2
this.button120.UseUnderline = true;
this.button120.Label = "Valider";
this.hbox1.Add (this.button120);
- global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button120]));
- w15.Position = 1;
- w15.Expand = false;
- w15.Fill = false;
+ global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button120]));
+ w17.Position = 1;
+ w17.Expand = false;
+ w17.Fill = false;
this.vbox2.Add (this.hbox1);
- global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
- w16.PackType = ((global::Gtk.PackType)(1));
- w16.Position = 2;
- w16.Expand = false;
- w16.Fill = false;
+ 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.Hide ();
+ this.button120.Clicked += new global::System.EventHandler (this.OnButton120Clicked);
}
}
}
diff --git a/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs b/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs
index 2a15bba..3b404ce 100644
--- a/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs
+++ b/DMX-2.0/gtk-gui/DMX2.GestionDriversUI.cs
@@ -128,7 +128,7 @@ namespace DMX2
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.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/gui.stetic b/DMX-2.0/gtk-gui/gui.stetic
index aa86c5d..2bb68d6 100644
--- a/DMX-2.0/gtk-gui/gui.stetic
+++ b/DMX-2.0/gtk-gui/gui.stetic
@@ -1912,7 +1912,7 @@ au sequenceur
True
StockItem
gtk-disconnect
-
+
gtk-disconnect
@@ -2156,10 +2156,16 @@ au sequenceur
- 3
+ 4
4
6
6
+
+
+
+
+
+
@@ -2408,6 +2414,48 @@ au sequenceur
False
+
+
+
+ 0
+
+
+ 3
+ 4
+ 2
+ 3
+ True
+ Fill
+ Fill
+ False
+ True
+ False
+ False
+ True
+ False
+
+
+
+
+
+ Vérif
+
+
+ 3
+ 4
+ 1
+ 2
+ True
+ Fill
+ Fill
+ False
+ True
+ False
+ False
+ True
+ False
+
+
1
@@ -2430,6 +2478,7 @@ au sequenceur
TextOnly
Valider
True
+
1