Ajout Driver Arduino Micro
This commit is contained in:
parent
b02d9c3929
commit
3fe2d423eb
6 changed files with 1223 additions and 0 deletions
|
|
@ -151,6 +151,9 @@
|
||||||
<Compile Include="Conduite.cs" />
|
<Compile Include="Conduite.cs" />
|
||||||
<Compile Include="About.cs" />
|
<Compile Include="About.cs" />
|
||||||
<Compile Include="gtk-gui\DMX2.About.cs" />
|
<Compile Include="gtk-gui\DMX2.About.cs" />
|
||||||
|
<Compile Include="DriverBoitierV3.cs" />
|
||||||
|
<Compile Include="DriverBoitierV3UI.cs" />
|
||||||
|
<Compile Include="gtk-gui\DMX2.DriverBoitierV3UI.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
|
|
|
||||||
593
DMX-2.0/DriverBoitierV3.cs
Normal file
593
DMX-2.0/DriverBoitierV3.cs
Normal file
|
|
@ -0,0 +1,593 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Threading;
|
||||||
|
using System.IO.Ports;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace DMX2
|
||||||
|
{
|
||||||
|
public class DriverBoitierV3 : DriverDMX, IEventProvider
|
||||||
|
{
|
||||||
|
|
||||||
|
struct dmxState {
|
||||||
|
public dmxState(int _dmx, byte _value){
|
||||||
|
value=_value; dmx=_dmx;
|
||||||
|
}
|
||||||
|
public int dmx;
|
||||||
|
public byte value;
|
||||||
|
}
|
||||||
|
|
||||||
|
enum etatAutomate {
|
||||||
|
Deconnecte,
|
||||||
|
Transmission,
|
||||||
|
Erreur,
|
||||||
|
Fin
|
||||||
|
}
|
||||||
|
|
||||||
|
const int timeout = 200;
|
||||||
|
|
||||||
|
// tampons Entrée/Sortie
|
||||||
|
public byte[] inputbuffer = new byte[516];
|
||||||
|
byte[] outputbuffer = new byte[514];
|
||||||
|
|
||||||
|
//Thread de boucle
|
||||||
|
Thread loopthread=null;
|
||||||
|
|
||||||
|
public UniversDMX patch1=null;
|
||||||
|
|
||||||
|
|
||||||
|
string portname = "";
|
||||||
|
SerialPort serial = null;
|
||||||
|
|
||||||
|
|
||||||
|
int brk = 150;
|
||||||
|
int mab = 50;
|
||||||
|
int nbc1 = 512;
|
||||||
|
byte flag_merge1 = 1;
|
||||||
|
|
||||||
|
|
||||||
|
bool reinit=false ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void ReInit () {
|
||||||
|
reinit=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Break {
|
||||||
|
get {
|
||||||
|
return brk;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int Mab {
|
||||||
|
get {
|
||||||
|
return mab;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte Flag_merge1 {
|
||||||
|
get {
|
||||||
|
return flag_merge1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public DriverBoitierV3 (string serialport, string id): base(id)
|
||||||
|
{
|
||||||
|
portname = serialport;
|
||||||
|
outputbuffer[0]=27;
|
||||||
|
outputbuffer[1]=68;
|
||||||
|
Start();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool paramFlag = false;
|
||||||
|
|
||||||
|
public void SetBreak( int _brk, int _mab, byte _merge1)
|
||||||
|
{
|
||||||
|
brk = _brk;
|
||||||
|
mab = _mab;
|
||||||
|
flag_merge1 = _merge1;
|
||||||
|
paramFlag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Start ()
|
||||||
|
{
|
||||||
|
if (loopthread == null) {
|
||||||
|
loopthread = new Thread(new ThreadStart(MainLoop));
|
||||||
|
loopthread.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Connection ()
|
||||||
|
{
|
||||||
|
Console.WriteLine ("DriverV3.Connection()");
|
||||||
|
if (serial != null) {
|
||||||
|
serial.Close ();
|
||||||
|
serial.Dispose ();
|
||||||
|
serial = null;
|
||||||
|
}
|
||||||
|
if (!System.IO.File.Exists (portname)) {
|
||||||
|
Thread.Sleep (200);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
serial = new SerialPort (portname);//, 9600, Parity.None, 8, StopBits.One);
|
||||||
|
Console.WriteLine (portname);
|
||||||
|
//serial.DtrEnable = false;
|
||||||
|
//serial.ReadTimeout = 200;
|
||||||
|
//serial.WriteTimeout = 200;
|
||||||
|
try {
|
||||||
|
serial.Open ();
|
||||||
|
serial.RtsEnable = true;
|
||||||
|
serial.DtrEnable = true;
|
||||||
|
Attente(DateTime.Now.AddMilliseconds(2000));
|
||||||
|
|
||||||
|
if(Synchronisation())
|
||||||
|
etat = etatAutomate.Transmission;
|
||||||
|
else {
|
||||||
|
serial.Close();
|
||||||
|
etat = etatAutomate.Deconnecte;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception ex) {
|
||||||
|
etat = etatAutomate.Deconnecte;
|
||||||
|
Console.WriteLine("DriverV3:Connection : {0}",ex);
|
||||||
|
Thread.Sleep (500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Synchronise le pilote et le boitier ...
|
||||||
|
/// Après connexion ou erreur
|
||||||
|
/// </summary>
|
||||||
|
bool Synchronisation ()
|
||||||
|
{
|
||||||
|
//return true;
|
||||||
|
Console.WriteLine ("DriverV3.Synchronisation()");
|
||||||
|
|
||||||
|
if (serial == null)
|
||||||
|
return false;
|
||||||
|
if (!serial.IsOpen)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Au cas ou le boitier attends une fin de commande : envoi 1030 octets a 0 (le boitier ignorera tout seul la suite)
|
||||||
|
byte[] tmpBuffer = new byte[530];
|
||||||
|
serial.Write (tmpBuffer, 0, 530);
|
||||||
|
|
||||||
|
// On attends un peu
|
||||||
|
Thread.Sleep (300);
|
||||||
|
|
||||||
|
// Vide le buffer d'entree
|
||||||
|
if (serial.BytesToRead > 0)
|
||||||
|
serial.ReadExisting ();
|
||||||
|
|
||||||
|
if(serial.BytesToWrite > 0)
|
||||||
|
Console.WriteLine("Les infos partent pas ...");
|
||||||
|
|
||||||
|
// on envoie Esc 'A'
|
||||||
|
tmpBuffer [0] = 27;
|
||||||
|
tmpBuffer [1] = 65;
|
||||||
|
serial.Write (tmpBuffer, 0, 2);
|
||||||
|
|
||||||
|
// On attends un peu
|
||||||
|
if(!WaitForData (1)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
paramFlag = true;
|
||||||
|
serial.Read(tmpBuffer,0,1);
|
||||||
|
if(tmpBuffer[0] == 65) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
volatile etatAutomate etat = etatAutomate.Deconnecte;
|
||||||
|
DateTime finAttente = DateTime.Now;
|
||||||
|
int compteErreur = 0;
|
||||||
|
|
||||||
|
void MainLoop ()
|
||||||
|
{
|
||||||
|
//DateTime t = DateTime.Now;
|
||||||
|
while (etat != etatAutomate.Fin) {
|
||||||
|
try {
|
||||||
|
switch (etat) {
|
||||||
|
case etatAutomate.Deconnecte:
|
||||||
|
Connection ();
|
||||||
|
compteErreur = 0;
|
||||||
|
break;
|
||||||
|
case etatAutomate.Transmission:
|
||||||
|
finAttente = DateTime.Now.AddMilliseconds (22);
|
||||||
|
//Console.WriteLine(DateTime.Now-t);
|
||||||
|
//t = DateTime.Now;
|
||||||
|
EnvoiTrame ();
|
||||||
|
Reception ();
|
||||||
|
Attente (finAttente);
|
||||||
|
if (paramFlag)
|
||||||
|
Parametrage ();
|
||||||
|
if (reinit)
|
||||||
|
EnvoieReInit();
|
||||||
|
break;
|
||||||
|
case etatAutomate.Erreur:
|
||||||
|
Console.WriteLine("DriverV3 : etatAutomate.Erreur");
|
||||||
|
compteErreur ++;
|
||||||
|
Deconnecte ();
|
||||||
|
Attente (DateTime.Now.AddSeconds (2));
|
||||||
|
break;
|
||||||
|
// case etatAutomate.Parametrage:
|
||||||
|
// EnvoiParam();
|
||||||
|
// break;
|
||||||
|
// case etatAutomate.Reset:
|
||||||
|
// EnvoiReset();
|
||||||
|
// break;
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Console.WriteLine("Exception dans DriverV3 : {0}",ex);
|
||||||
|
if(etat != etatAutomate.Fin) etat = etatAutomate.Erreur;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Deconnecte();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Attente (DateTime date)
|
||||||
|
{
|
||||||
|
int sleeptime = (int) (date - DateTime.Now).TotalMilliseconds-1;
|
||||||
|
if(sleeptime>2)
|
||||||
|
Thread.Sleep(sleeptime);
|
||||||
|
|
||||||
|
while (DateTime.Now<date) Thread.Sleep(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Deconnecte ()
|
||||||
|
{
|
||||||
|
Console.WriteLine("DriverV3.Deconnection");
|
||||||
|
etat = etatAutomate.Deconnecte;
|
||||||
|
if(serial == null) return;
|
||||||
|
|
||||||
|
serial.Close();
|
||||||
|
serial.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnvoiTrame ()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
if(patch1!=null) patch1.CalculUnivers(outputbuffer,2,512);
|
||||||
|
|
||||||
|
if(!serial.IsOpen) {
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
while (serial.BytesToWrite > 0)
|
||||||
|
Thread.Sleep(1);
|
||||||
|
|
||||||
|
serial.Write(outputbuffer,0,outputbuffer.Length);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Console.WriteLine("Exception Envoi {0}",ex);
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WaitForData (int len)
|
||||||
|
{
|
||||||
|
int wcnt =0 ;
|
||||||
|
|
||||||
|
while (serial.BytesToRead < len) {
|
||||||
|
Thread.Sleep (1);
|
||||||
|
if (++wcnt > timeout)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// void EnvoiParam ()
|
||||||
|
// {
|
||||||
|
// throw new NotImplementedException ();
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// void EnvoiReset ()
|
||||||
|
// {
|
||||||
|
// throw new NotImplementedException ();
|
||||||
|
// }
|
||||||
|
byte flag_input;
|
||||||
|
void Reception ()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
if(!serial.IsOpen || etat == etatAutomate.Erreur) {
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!WaitForData (inputbuffer.Length)) {
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
Console.WriteLine("DriverV3.Reception : attente depassee");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
serial.Read(inputbuffer,0,inputbuffer.Length);
|
||||||
|
if (flag_input != inputbuffer[0]) {
|
||||||
|
flag_input = inputbuffer[0];
|
||||||
|
Console.WriteLine(flag_input );
|
||||||
|
}
|
||||||
|
if(serial.BytesToRead>0)
|
||||||
|
serial.ReadExisting ();
|
||||||
|
|
||||||
|
ProcessData();
|
||||||
|
|
||||||
|
compteErreur= 0;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Console.WriteLine(serial.BytesToRead);
|
||||||
|
Console.WriteLine("Exception Reception {0}",ex);
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Parametrage ()
|
||||||
|
{
|
||||||
|
paramFlag = false;
|
||||||
|
|
||||||
|
if (!serial.IsOpen) {
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
byte[] tmpBuffer = new byte[6];
|
||||||
|
|
||||||
|
tmpBuffer [0] = 27; // Esc
|
||||||
|
tmpBuffer [1] = 66; // 'B'
|
||||||
|
|
||||||
|
tmpBuffer [2] = // nb circuits
|
||||||
|
(byte)(nbc1 / 2 - 1);
|
||||||
|
|
||||||
|
tmpBuffer [3] = (byte)brk;
|
||||||
|
tmpBuffer [4] = (byte)mab;
|
||||||
|
|
||||||
|
tmpBuffer [5] = (byte) (flag_merge1 );
|
||||||
|
|
||||||
|
serial.Write (tmpBuffer, 0, tmpBuffer.Length);
|
||||||
|
|
||||||
|
if(!WaitForData (1)) {
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
serial.Read(tmpBuffer,0,1);
|
||||||
|
if(tmpBuffer[0] != 66)
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnvoieReInit()
|
||||||
|
{
|
||||||
|
reinit = false;
|
||||||
|
|
||||||
|
if (!serial.IsOpen) {
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
byte[] tmpBuffer = new byte[2];
|
||||||
|
|
||||||
|
tmpBuffer [0] = 27; // Esc
|
||||||
|
tmpBuffer [1] = 67; // 'B'
|
||||||
|
|
||||||
|
serial.Write (tmpBuffer, 0, tmpBuffer.Length);
|
||||||
|
|
||||||
|
if(!WaitForData (1)) {
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
|
serial.Read(tmpBuffer,0,1);
|
||||||
|
if(tmpBuffer[0] != 67)
|
||||||
|
etat = etatAutomate.Erreur;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ProcessData ()
|
||||||
|
{
|
||||||
|
lock(watchdmx)
|
||||||
|
foreach (int dmx in watchdmx) {
|
||||||
|
if( inputbuffer[dmx-1]!= lastVal[dmx]){
|
||||||
|
lastVal[dmx] = inputbuffer[dmx-1];
|
||||||
|
eventsPending.Enqueue(new dmxState(dmx,inputbuffer[dmx-1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Dispose ()
|
||||||
|
{
|
||||||
|
disposed = true;
|
||||||
|
etat = etatAutomate.Fin;
|
||||||
|
if (loopthread != null) {
|
||||||
|
loopthread.Join ();
|
||||||
|
loopthread = null;
|
||||||
|
}
|
||||||
|
//TODO : Close Port
|
||||||
|
if(serial != null)
|
||||||
|
serial.Dispose();
|
||||||
|
|
||||||
|
}
|
||||||
|
#region implemented abstract members of DMX2.DriverDMX
|
||||||
|
public override Gtk.Widget GetUI ()
|
||||||
|
{
|
||||||
|
return new DriverBoitierV3UI(this);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region IEventProvider implementation
|
||||||
|
|
||||||
|
List<int> watchdmx = new List<int>();
|
||||||
|
Dictionary<int,byte> lastVal = new Dictionary<int, byte>();
|
||||||
|
|
||||||
|
static System.Text.RegularExpressions.Regex regexEventID = new System.Text.RegularExpressions.Regex(
|
||||||
|
@"BV2-D(?<dmx>\d+)?",
|
||||||
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
System.Collections.Concurrent.ConcurrentQueue<dmxState> eventsPending =
|
||||||
|
new System.Collections.Concurrent.ConcurrentQueue<dmxState>();
|
||||||
|
|
||||||
|
bool IEventProvider.Bind (string eventId)
|
||||||
|
{
|
||||||
|
var res = regexEventID.Match (eventId);
|
||||||
|
if (res.Success) {
|
||||||
|
int dmx = int.Parse (res.Groups ["dmx"].Value);
|
||||||
|
if(dmx<0||dmx>511) return false;
|
||||||
|
lock(watchdmx){
|
||||||
|
if(!watchdmx.Contains(dmx))
|
||||||
|
{
|
||||||
|
watchdmx.Add(dmx);
|
||||||
|
lastVal[dmx] = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IEventProvider.Unbind (string eventId)
|
||||||
|
{
|
||||||
|
var res = regexEventID.Match (eventId);
|
||||||
|
if (res.Success) {
|
||||||
|
int dmx = int.Parse (res.Groups ["dmx"].Value);
|
||||||
|
if(dmx<1||dmx>512) return;
|
||||||
|
lock(watchdmx) watchdmx.Remove (dmx);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Gtk.Menu IEventProvider.GetProviderSubMenu (EventManager.EventMenuData state, Gtk.ButtonPressEventHandler handler)
|
||||||
|
{
|
||||||
|
Gtk.Menu retmenu = new Gtk.Menu ();
|
||||||
|
|
||||||
|
Gtk.MenuItem evmenuitem = new Gtk.MenuItem ("Entrée DMX");
|
||||||
|
retmenu.Add (evmenuitem);
|
||||||
|
Gtk.Menu evmenu = new Gtk.Menu ();
|
||||||
|
evmenuitem.Submenu = evmenu;
|
||||||
|
|
||||||
|
for (int c = 0; c<512; c+=100) {
|
||||||
|
Gtk.MenuItem citem = new Gtk.MenuItem(string.Format("De {0} à {1}", c==0?1:c, c==500?512:c+99 ));
|
||||||
|
Gtk.Menu cmenu = new Gtk.Menu();
|
||||||
|
citem.Submenu = cmenu;
|
||||||
|
evmenu.Add(citem);
|
||||||
|
|
||||||
|
for(int d=0 ; d<100;d+=10){
|
||||||
|
if(c+d>512) break;
|
||||||
|
Gtk.MenuItem ditem = new Gtk.MenuItem(string.Format("De {0} à {1}", c+d==0?1:c+d, c+d==510?512:c+d+9 ));
|
||||||
|
Gtk.Menu dmenu = new Gtk.Menu();
|
||||||
|
ditem.Submenu = dmenu;
|
||||||
|
cmenu.Add(ditem);
|
||||||
|
|
||||||
|
for(int u=0; u<10;u++){
|
||||||
|
if(c+d+u==0) continue;
|
||||||
|
if(c+d+u>512) break;
|
||||||
|
Gtk.MenuItem uitem = new Gtk.MenuItem(string.Format("Entrée DMX {0}",c+d+u));
|
||||||
|
uitem.Data[EventManager.EventIdKey] = string.Format("BV2-D{0}",c+d+u);
|
||||||
|
uitem.Data[EventManager.StateKey] = state;
|
||||||
|
uitem.ButtonPressEvent += handler;
|
||||||
|
dmenu.Add (uitem);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return retmenu;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IEventProvider.ProcessEvents (EventManagerCallback callback)
|
||||||
|
{
|
||||||
|
dmxState dmxs;
|
||||||
|
EventData evd;
|
||||||
|
while (eventsPending.TryDequeue(out dmxs)) {
|
||||||
|
evd.id= string.Format("BV2-D{0}",dmxs.dmx );
|
||||||
|
evd.value = dmxs.value;
|
||||||
|
callback(evd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string IEventProvider.MenuName {
|
||||||
|
get {
|
||||||
|
return "Boitier V2";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region implemented abstract members of DMX2.DriverDMX
|
||||||
|
public override void Save (System.Xml.XmlElement parent)
|
||||||
|
{
|
||||||
|
System.Xml.XmlElement el = parent.OwnerDocument.CreateElement ("DriverBoitierV3");
|
||||||
|
|
||||||
|
parent.AppendChild (el);
|
||||||
|
|
||||||
|
el.SetAttribute ("portname", portname.ToString ());
|
||||||
|
el.SetAttribute ("id", ID);
|
||||||
|
|
||||||
|
if(patch1!=null) el.SetAttribute ("univers1", patch1.Nom);
|
||||||
|
|
||||||
|
|
||||||
|
el.SetAttribute("mab",mab.ToString());
|
||||||
|
el.SetAttribute("brk",brk.ToString());
|
||||||
|
el.SetAttribute("merge1",(flag_merge1!=0).ToString());
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public static new DriverDMX Load(Conduite conduite, XmlElement el) {
|
||||||
|
//System.Xml.XmlElement xmlE;
|
||||||
|
|
||||||
|
string port = el.GetAttribute("portname");
|
||||||
|
|
||||||
|
if(! System.IO.File.Exists(port)) return null;
|
||||||
|
|
||||||
|
string id = el.GetAttribute("id");
|
||||||
|
|
||||||
|
DriverBoitierV3 drv = new DriverBoitierV3(port,id);
|
||||||
|
|
||||||
|
if(el.HasAttribute("univers1"))
|
||||||
|
{
|
||||||
|
string univ = el.GetAttribute("univers1");
|
||||||
|
foreach (UniversDMX u in conduite.Patches){
|
||||||
|
if(u.Nom== univ){
|
||||||
|
drv.patch1 = u;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int mab,brk;
|
||||||
|
byte merge1;
|
||||||
|
|
||||||
|
mab = int.Parse(el.TryGetAttribute("mab","150"));
|
||||||
|
brk = int.Parse(el.TryGetAttribute("brk","50"));
|
||||||
|
merge1 = (byte)( bool.Parse(el.TryGetAttribute("merge1","True"))?1:0 );
|
||||||
|
|
||||||
|
|
||||||
|
drv.SetBreak(brk,mab,merge1);
|
||||||
|
|
||||||
|
return drv;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
113
DMX-2.0/DriverBoitierV3UI.cs
Normal file
113
DMX-2.0/DriverBoitierV3UI.cs
Normal file
|
|
@ -0,0 +1,113 @@
|
||||||
|
/*
|
||||||
|
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Gtk;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
namespace DMX2
|
||||||
|
{
|
||||||
|
[System.ComponentModel.ToolboxItem(true)]
|
||||||
|
public partial class DriverBoitierV3UI : Gtk.Bin
|
||||||
|
{
|
||||||
|
DriverBoitierV3 drv;
|
||||||
|
public DriverBoitierV3UI (DriverBoitierV3 _drv)
|
||||||
|
{
|
||||||
|
drv = _drv;
|
||||||
|
this.Build ();
|
||||||
|
ConstruitCBUnivers();
|
||||||
|
}
|
||||||
|
|
||||||
|
ListStore lsCbUnivers1 = new ListStore(typeof(UniversDMX));
|
||||||
|
|
||||||
|
void ConstruitCBUnivers ()
|
||||||
|
{
|
||||||
|
caseBrk.Text = drv.Break.ToString ();
|
||||||
|
caseMab.Text = drv.Mab.ToString ();
|
||||||
|
|
||||||
|
chkMerge1.Active = drv.Flag_merge1 == 1;
|
||||||
|
|
||||||
|
cbUnivers1.Model = lsCbUnivers1;
|
||||||
|
var cellCbUnivers1 = new CellRendererText ();
|
||||||
|
cbUnivers1.PackStart (cellCbUnivers1, false);
|
||||||
|
cbUnivers1.SetCellDataFunc (cellCbUnivers1, new CellLayoutDataFunc (RenderUniversName1));
|
||||||
|
|
||||||
|
int indx = 0;
|
||||||
|
int i = 0;
|
||||||
|
foreach (UniversDMX u in Conduite.Courante.Patches) {
|
||||||
|
lsCbUnivers1.AppendValues (u);
|
||||||
|
if (u==drv.patch1) indx=i;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
TreeIter iter;
|
||||||
|
lsCbUnivers1.GetIterFirst (out iter);
|
||||||
|
cbUnivers1.SetActiveIter (iter);
|
||||||
|
cbUnivers1.Active=indx;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderUniversName1 (CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
UniversDMX univers = tree_model.GetValue (iter, 0) as UniversDMX;
|
||||||
|
if(univers != null)
|
||||||
|
(cell as Gtk.CellRendererText).Text = univers.Nom;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderUniversName2 (CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter)
|
||||||
|
{
|
||||||
|
UniversDMX univers = tree_model.GetValue (iter, 0) as UniversDMX;
|
||||||
|
if(univers != null)
|
||||||
|
(cell as Gtk.CellRendererText).Text = univers.Nom;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnButtonValider (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
TreeIter iter;
|
||||||
|
if (cbUnivers1.GetActiveIter (out iter)) {
|
||||||
|
drv.patch1 = lsCbUnivers1.GetValue (iter, 0) as UniversDMX;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int a, b;
|
||||||
|
if (!int.TryParse (caseBrk.Text, out a))
|
||||||
|
return;
|
||||||
|
if (!int.TryParse (caseMab.Text, out b))
|
||||||
|
return;
|
||||||
|
if (a < 92) {
|
||||||
|
a = 92;
|
||||||
|
}
|
||||||
|
if (b < 12) {
|
||||||
|
b = 12;
|
||||||
|
}
|
||||||
|
drv.SetBreak(a,b,(byte)(chkMerge1.Active?1:0));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnBtnInitClicked (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
drv.ReInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -38,6 +38,7 @@ namespace DMX2
|
||||||
lsDriver = new Gtk.ListStore(typeof (String));
|
lsDriver = new Gtk.ListStore(typeof (String));
|
||||||
lsDriver.AppendValues("V1 256/0/0/8");
|
lsDriver.AppendValues("V1 256/0/0/8");
|
||||||
lsDriver.AppendValues("V2 1024/512/16/16");
|
lsDriver.AppendValues("V2 1024/512/16/16");
|
||||||
|
lsDriver.AppendValues("V3 512/512");
|
||||||
|
|
||||||
comboDriver.Model = lsDriver;
|
comboDriver.Model = lsDriver;
|
||||||
|
|
||||||
|
|
@ -159,6 +160,12 @@ namespace DMX2
|
||||||
Conduite.Courante.DriversAdd(drv);
|
Conduite.Courante.DriversAdd(drv);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
drv = new DriverBoitierV3(fi.FullName, fi.Name);
|
||||||
|
Conduite.Courante.DriversAdd(drv);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
204
DMX-2.0/gtk-gui/DMX2.DriverBoitierV3UI.cs
Normal file
204
DMX-2.0/gtk-gui/DMX2.DriverBoitierV3UI.cs
Normal file
|
|
@ -0,0 +1,204 @@
|
||||||
|
|
||||||
|
// This file has been generated by the GUI designer. Do not modify.
|
||||||
|
namespace DMX2
|
||||||
|
{
|
||||||
|
public partial class DriverBoitierV3UI
|
||||||
|
{
|
||||||
|
private global::Gtk.VBox vbox2;
|
||||||
|
private global::Gtk.Label label1;
|
||||||
|
private global::Gtk.Table table1;
|
||||||
|
private global::Gtk.Entry caseBrk;
|
||||||
|
private global::Gtk.Entry caseMab;
|
||||||
|
private global::Gtk.ComboBox cbUnivers1;
|
||||||
|
private global::Gtk.CheckButton chkMerge1;
|
||||||
|
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 label8;
|
||||||
|
private global::Gtk.HBox hbox1;
|
||||||
|
private global::Gtk.Button btnValider;
|
||||||
|
private global::Gtk.Button btnInit;
|
||||||
|
|
||||||
|
protected virtual void Build ()
|
||||||
|
{
|
||||||
|
global::Stetic.Gui.Initialize (this);
|
||||||
|
// Widget DMX2.DriverBoitierV3UI
|
||||||
|
global::Stetic.BinContainer.Attach (this);
|
||||||
|
this.Name = "DMX2.DriverBoitierV3UI";
|
||||||
|
// Container child DMX2.DriverBoitierV3UI.Gtk.Container+ContainerChild
|
||||||
|
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]));
|
||||||
|
w1.Position = 0;
|
||||||
|
w1.Expand = false;
|
||||||
|
w1.Fill = false;
|
||||||
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
|
this.table1 = new global::Gtk.Table (((uint)(3)), ((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.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]));
|
||||||
|
w2.TopAttach = ((uint)(1));
|
||||||
|
w2.BottomAttach = ((uint)(2));
|
||||||
|
w2.LeftAttach = ((uint)(2));
|
||||||
|
w2.RightAttach = ((uint)(3));
|
||||||
|
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.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]));
|
||||||
|
w3.TopAttach = ((uint)(1));
|
||||||
|
w3.BottomAttach = ((uint)(2));
|
||||||
|
w3.LeftAttach = ((uint)(3));
|
||||||
|
w3.RightAttach = ((uint)(4));
|
||||||
|
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.Name = "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));
|
||||||
|
w4.RightAttach = ((uint)(2));
|
||||||
|
w4.XOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
w4.YOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
// Container child table1.Gtk.Table+TableChild
|
||||||
|
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 w5 = ((global::Gtk.Table.TableChild)(this.table1 [this.chkMerge1]));
|
||||||
|
w5.TopAttach = ((uint)(1));
|
||||||
|
w5.BottomAttach = ((uint)(2));
|
||||||
|
w5.LeftAttach = ((uint)(4));
|
||||||
|
w5.RightAttach = ((uint)(5));
|
||||||
|
w5.XOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
w5.YOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
// Container child table1.Gtk.Table+TableChild
|
||||||
|
this.label2 = new global::Gtk.Label ();
|
||||||
|
this.label2.Name = "label2";
|
||||||
|
this.label2.LabelProp = "Etat";
|
||||||
|
this.table1.Add (this.label2);
|
||||||
|
global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table1 [this.label2]));
|
||||||
|
w6.XOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
w6.YOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
// Container child table1.Gtk.Table+TableChild
|
||||||
|
this.label3 = new global::Gtk.Label ();
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.LabelProp = "Univer associé";
|
||||||
|
this.table1.Add (this.label3);
|
||||||
|
global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1 [this.label3]));
|
||||||
|
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.label4 = new global::Gtk.Label ();
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.LabelProp = "Break";
|
||||||
|
this.table1.Add (this.label4);
|
||||||
|
global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1 [this.label4]));
|
||||||
|
w8.LeftAttach = ((uint)(2));
|
||||||
|
w8.RightAttach = ((uint)(3));
|
||||||
|
w8.XOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
w8.YOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
// Container child table1.Gtk.Table+TableChild
|
||||||
|
this.label5 = new global::Gtk.Label ();
|
||||||
|
this.label5.Name = "label5";
|
||||||
|
this.label5.LabelProp = "MAB";
|
||||||
|
this.table1.Add (this.label5);
|
||||||
|
global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1 [this.label5]));
|
||||||
|
w9.LeftAttach = ((uint)(3));
|
||||||
|
w9.RightAttach = ((uint)(4));
|
||||||
|
w9.XOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
w9.YOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
// Container child table1.Gtk.Table+TableChild
|
||||||
|
this.label6 = new global::Gtk.Label ();
|
||||||
|
this.label6.Name = "label6";
|
||||||
|
this.label6.LabelProp = "Block 1";
|
||||||
|
this.table1.Add (this.label6);
|
||||||
|
global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1 [this.label6]));
|
||||||
|
w10.TopAttach = ((uint)(1));
|
||||||
|
w10.BottomAttach = ((uint)(2));
|
||||||
|
w10.XOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
w10.YOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
// Container child table1.Gtk.Table+TableChild
|
||||||
|
this.label8 = new global::Gtk.Label ();
|
||||||
|
this.label8.Name = "label8";
|
||||||
|
this.label8.LabelProp = "Merge";
|
||||||
|
this.table1.Add (this.label8);
|
||||||
|
global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1 [this.label8]));
|
||||||
|
w11.LeftAttach = ((uint)(4));
|
||||||
|
w11.RightAttach = ((uint)(5));
|
||||||
|
w11.XOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
w11.YOptions = ((global::Gtk.AttachOptions)(4));
|
||||||
|
this.vbox2.Add (this.table1);
|
||||||
|
global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1]));
|
||||||
|
w12.Position = 1;
|
||||||
|
// 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.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 w13 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btnValider]));
|
||||||
|
w13.Position = 1;
|
||||||
|
w13.Expand = false;
|
||||||
|
w13.Fill = false;
|
||||||
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
|
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 w14 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btnInit]));
|
||||||
|
w14.Position = 2;
|
||||||
|
w14.Expand = false;
|
||||||
|
w14.Fill = false;
|
||||||
|
this.vbox2.Add (this.hbox1);
|
||||||
|
global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
|
||||||
|
w15.PackType = ((global::Gtk.PackType)(1));
|
||||||
|
w15.Position = 2;
|
||||||
|
w15.Expand = false;
|
||||||
|
w15.Fill = false;
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2632,4 +2632,307 @@ Licence : GPL V2</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="Gtk.Bin" id="DMX2.DriverBoitierV3UI" design-size="529 300">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Visible">False</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.VBox" id="vbox2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="label1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">Driver V3</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.Table" id="table1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="NRows">3</property>
|
||||||
|
<property name="NColumns">5</property>
|
||||||
|
<property name="RowSpacing">6</property>
|
||||||
|
<property name="ColumnSpacing">6</property>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Entry" id="caseBrk">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="IsEditable">True</property>
|
||||||
|
<property name="InvisibleChar">•</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="TopAttach">1</property>
|
||||||
|
<property name="BottomAttach">2</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.Entry" id="caseMab">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="IsEditable">True</property>
|
||||||
|
<property name="InvisibleChar">•</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="TopAttach">1</property>
|
||||||
|
<property name="BottomAttach">2</property>
|
||||||
|
<property name="LeftAttach">3</property>
|
||||||
|
<property name="RightAttach">4</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.ComboBox" id="cbUnivers1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="IsTextCombo">True</property>
|
||||||
|
<property name="Items" translatable="yes" />
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="TopAttach">1</property>
|
||||||
|
<property name="BottomAttach">2</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>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.CheckButton" id="chkMerge1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="DrawIndicator">True</property>
|
||||||
|
<property name="HasLabel">True</property>
|
||||||
|
<property name="UseUnderline">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="TopAttach">1</property>
|
||||||
|
<property name="BottomAttach">2</property>
|
||||||
|
<property name="LeftAttach">4</property>
|
||||||
|
<property name="RightAttach">5</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="label2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">Etat</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<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="label3">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">Univer associé</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<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>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="label4">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">Break</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<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="label5">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">MAB</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="LeftAttach">3</property>
|
||||||
|
<property name="RightAttach">4</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="label6">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">Block 1</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="TopAttach">1</property>
|
||||||
|
<property name="BottomAttach">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>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="label8">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">Merge</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="LeftAttach">4</property>
|
||||||
|
<property name="RightAttach">5</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>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.HBox" id="hbox1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Button" id="btnValider">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="Type">TextOnly</property>
|
||||||
|
<property name="Label" translatable="yes">Valider</property>
|
||||||
|
<property name="UseUnderline">True</property>
|
||||||
|
<signal name="Clicked" handler="OnButtonValider" />
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Button" id="btnInit">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="Type">TextOnly</property>
|
||||||
|
<property name="Label" translatable="yes">Init Boitier</property>
|
||||||
|
<property name="UseUnderline">True</property>
|
||||||
|
<signal name="Clicked" handler="OnBtnInitClicked" />
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">2</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="PackType">End</property>
|
||||||
|
<property name="Position">2</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
</stetic-interface>
|
</stetic-interface>
|
||||||
Loading…
Reference in a new issue