suite
This commit is contained in:
parent
bc18b51425
commit
4968abe429
6 changed files with 116 additions and 25 deletions
|
|
@ -29,13 +29,14 @@ namespace DMX2
|
||||||
|
|
||||||
|
|
||||||
// tampons Entrée/Sortie
|
// tampons Entrée/Sortie
|
||||||
byte[] inputbuffer = new byte[1];
|
public byte[] inputbuffer = new byte[532];
|
||||||
byte[] outputbuffer = new byte[260];
|
byte[] outputbuffer = new byte[514];
|
||||||
|
|
||||||
//Thread de boucle
|
//Thread de boucle
|
||||||
Thread loopthread=null;
|
Thread loopthread=null;
|
||||||
|
|
||||||
public UniversDMX patch=null;
|
public UniversDMX patch1=null;
|
||||||
|
public UniversDMX patch2=null;
|
||||||
|
|
||||||
string portname = "";
|
string portname = "";
|
||||||
SerialPort serial = null;
|
SerialPort serial = null;
|
||||||
|
|
@ -43,12 +44,8 @@ namespace DMX2
|
||||||
public DriverBoitierV2 (string serialport, string id): base(id)
|
public DriverBoitierV2 (string serialport, string id): base(id)
|
||||||
{
|
{
|
||||||
portname = serialport;
|
portname = serialport;
|
||||||
//patch = Conduite.Courante.Patches[0];
|
|
||||||
//Start();
|
|
||||||
//serial = serialport;
|
|
||||||
outputbuffer[0]=27;
|
outputbuffer[0]=27;
|
||||||
outputbuffer[1]=68;
|
outputbuffer[1]=68;
|
||||||
outputbuffer[4]=255;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,7 +129,7 @@ namespace DMX2
|
||||||
etat = etatAutomate.Erreur;
|
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);
|
serial.Write(outputbuffer,0,outputbuffer.Length);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,21 @@ namespace DMX2
|
||||||
UniversDMX univers = tree_model.GetValue (iter, 0) as UniversDMX;
|
UniversDMX univers = tree_model.GetValue (iter, 0) as UniversDMX;
|
||||||
if(univers != null)
|
if(univers != null)
|
||||||
(cell as Gtk.CellRendererText).Text = univers.Nom;
|
(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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,11 @@ namespace DMX2
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void OnBtnDisConnectClicked (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
//Dispose;
|
||||||
|
}
|
||||||
|
|
||||||
void AfficheDriverUI(DriverDMX drv){
|
void AfficheDriverUI(DriverDMX drv){
|
||||||
btnConnect.Visible = false;
|
btnConnect.Visible = false;
|
||||||
comboDriver.Sensitive = false;
|
comboDriver.Sensitive = false;
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ namespace DMX2
|
||||||
private global::Gtk.Label label5;
|
private global::Gtk.Label label5;
|
||||||
private global::Gtk.Label label6;
|
private global::Gtk.Label label6;
|
||||||
private global::Gtk.Label label7;
|
private global::Gtk.Label label7;
|
||||||
|
private global::Gtk.Label labVal;
|
||||||
|
private global::Gtk.Label labVerif;
|
||||||
private global::Gtk.HBox hbox1;
|
private global::Gtk.HBox hbox1;
|
||||||
private global::Gtk.Button button120;
|
private global::Gtk.Button button120;
|
||||||
|
|
||||||
|
|
@ -42,7 +44,7 @@ namespace DMX2
|
||||||
w1.Expand = false;
|
w1.Expand = false;
|
||||||
w1.Fill = false;
|
w1.Fill = false;
|
||||||
// Container child vbox2.Gtk.Box+BoxChild
|
// 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.Name = "table1";
|
||||||
this.table1.RowSpacing = ((uint)(6));
|
this.table1.RowSpacing = ((uint)(6));
|
||||||
this.table1.ColumnSpacing = ((uint)(6));
|
this.table1.ColumnSpacing = ((uint)(6));
|
||||||
|
|
@ -182,11 +184,35 @@ namespace DMX2
|
||||||
w13.BottomAttach = ((uint)(3));
|
w13.BottomAttach = ((uint)(3));
|
||||||
w13.XOptions = ((global::Gtk.AttachOptions)(4));
|
w13.XOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
w13.YOptions = ((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);
|
this.vbox2.Add (this.table1);
|
||||||
global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1]));
|
global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1]));
|
||||||
w14.Position = 1;
|
w16.Position = 1;
|
||||||
w14.Expand = false;
|
w16.Expand = false;
|
||||||
w14.Fill = false;
|
w16.Fill = false;
|
||||||
// Container child vbox2.Gtk.Box+BoxChild
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
this.hbox1 = new global::Gtk.HBox ();
|
this.hbox1 = new global::Gtk.HBox ();
|
||||||
this.hbox1.Name = "hbox1";
|
this.hbox1.Name = "hbox1";
|
||||||
|
|
@ -198,21 +224,22 @@ namespace DMX2
|
||||||
this.button120.UseUnderline = true;
|
this.button120.UseUnderline = true;
|
||||||
this.button120.Label = "Valider";
|
this.button120.Label = "Valider";
|
||||||
this.hbox1.Add (this.button120);
|
this.hbox1.Add (this.button120);
|
||||||
global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button120]));
|
global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button120]));
|
||||||
w15.Position = 1;
|
w17.Position = 1;
|
||||||
w15.Expand = false;
|
w17.Expand = false;
|
||||||
w15.Fill = false;
|
w17.Fill = false;
|
||||||
this.vbox2.Add (this.hbox1);
|
this.vbox2.Add (this.hbox1);
|
||||||
global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
|
global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
|
||||||
w16.PackType = ((global::Gtk.PackType)(1));
|
w18.PackType = ((global::Gtk.PackType)(1));
|
||||||
w16.Position = 2;
|
w18.Position = 2;
|
||||||
w16.Expand = false;
|
w18.Expand = false;
|
||||||
w16.Fill = false;
|
w18.Fill = false;
|
||||||
this.Add (this.vbox2);
|
this.Add (this.vbox2);
|
||||||
if ((this.Child != null)) {
|
if ((this.Child != null)) {
|
||||||
this.Child.ShowAll ();
|
this.Child.ShowAll ();
|
||||||
}
|
}
|
||||||
this.Hide ();
|
this.Hide ();
|
||||||
|
this.button120.Clicked += new global::System.EventHandler (this.OnButton120Clicked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ namespace DMX2
|
||||||
this.Show ();
|
this.Show ();
|
||||||
this.listeUsb.CursorChanged += new global::System.EventHandler (this.OnListeUsbCursorChanged);
|
this.listeUsb.CursorChanged += new global::System.EventHandler (this.OnListeUsbCursorChanged);
|
||||||
this.btnConnect.Clicked += new global::System.EventHandler (this.OnBtnConnectClicked);
|
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);
|
this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1912,7 +1912,7 @@ au sequenceur</property>
|
||||||
<property name="UseStock">True</property>
|
<property name="UseStock">True</property>
|
||||||
<property name="Type">StockItem</property>
|
<property name="Type">StockItem</property>
|
||||||
<property name="StockId">gtk-disconnect</property>
|
<property name="StockId">gtk-disconnect</property>
|
||||||
<signal name="Clicked" handler="OnBtnConnectClicked" />
|
<signal name="Clicked" handler="OnBtnDisConnectClicked" />
|
||||||
<property name="label">gtk-disconnect</property>
|
<property name="label">gtk-disconnect</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
|
@ -2156,10 +2156,16 @@ au sequenceur</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.Table" id="table1">
|
<widget class="Gtk.Table" id="table1">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="NRows">3</property>
|
<property name="NRows">4</property>
|
||||||
<property name="NColumns">4</property>
|
<property name="NColumns">4</property>
|
||||||
<property name="RowSpacing">6</property>
|
<property name="RowSpacing">6</property>
|
||||||
<property name="ColumnSpacing">6</property>
|
<property name="ColumnSpacing">6</property>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.ComboBox" id="cbUnivers1">
|
<widget class="Gtk.ComboBox" id="cbUnivers1">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
|
|
@ -2408,6 +2414,48 @@ au sequenceur</property>
|
||||||
<property name="YShrink">False</property>
|
<property name="YShrink">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="labVal">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="TopAttach">3</property>
|
||||||
|
<property name="BottomAttach">4</property>
|
||||||
|
<property name="LeftAttach">2</property>
|
||||||
|
<property name="RightAttach">3</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="XOptions">Fill</property>
|
||||||
|
<property name="YOptions">Fill</property>
|
||||||
|
<property name="XExpand">False</property>
|
||||||
|
<property name="XFill">True</property>
|
||||||
|
<property name="XShrink">False</property>
|
||||||
|
<property name="YExpand">False</property>
|
||||||
|
<property name="YFill">True</property>
|
||||||
|
<property name="YShrink">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="labVerif">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">Vérif</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="TopAttach">3</property>
|
||||||
|
<property name="BottomAttach">4</property>
|
||||||
|
<property name="LeftAttach">1</property>
|
||||||
|
<property name="RightAttach">2</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="XOptions">Fill</property>
|
||||||
|
<property name="YOptions">Fill</property>
|
||||||
|
<property name="XExpand">False</property>
|
||||||
|
<property name="XFill">True</property>
|
||||||
|
<property name="XShrink">False</property>
|
||||||
|
<property name="YExpand">False</property>
|
||||||
|
<property name="YFill">True</property>
|
||||||
|
<property name="YShrink">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">1</property>
|
<property name="Position">1</property>
|
||||||
|
|
@ -2430,6 +2478,7 @@ au sequenceur</property>
|
||||||
<property name="Type">TextOnly</property>
|
<property name="Type">TextOnly</property>
|
||||||
<property name="Label" translatable="yes">Valider</property>
|
<property name="Label" translatable="yes">Valider</property>
|
||||||
<property name="UseUnderline">True</property>
|
<property name="UseUnderline">True</property>
|
||||||
|
<signal name="Clicked" handler="OnButton120Clicked" />
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">1</property>
|
<property name="Position">1</property>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue