Construction interface patch

This commit is contained in:
tzim 2013-05-08 10:59:52 +00:00
parent c30548a7b3
commit 91ef14865c
6 changed files with 813 additions and 71 deletions

View file

@ -5,20 +5,120 @@ namespace DMX2
public partial class EditionUnivers : Gtk.Dialog public partial class EditionUnivers : Gtk.Dialog
{ {
UniversDMX universEdite; UniversDMX universEdite;
public EditionUnivers (UniversDMX univers , Window parent) : base ("Edition Univers",parent,Gtk.DialogFlags.Modal) public EditionUnivers (Window parent) : base ("Edition Univers",parent,DialogFlags.DestroyWithParent)
{ {
this.Build (); this.Build ();
universEdite = univers; ConstruitCBUnivers();
ConstruitCBCircuits();
ConstruitListe(); ConstruitCBFT();
} }
ListStore lsCbUnivers = new ListStore(typeof(UniversDMX));
void ConstruitListe () void ConstruitCBUnivers ()
{ {
cbUnivers.Model = lsCbUnivers;
var cellCbUnivers = new CellRendererText();
cbUnivers.PackStart(cellCbUnivers,false);
cbUnivers.SetCellDataFunc(cellCbUnivers, new CellLayoutDataFunc(RenderUniversName));
foreach(UniversDMX u in Conduite.Courante.Patches)
lsCbUnivers.AppendValues(u);
TreeIter iter;
lsCbUnivers.GetIterFirst(out iter);
cbUnivers.SetActiveIter(iter);
}
void RenderFTName (CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter)
{
object o = tree_model.GetValue (iter, 0);
if(o!=null)
(cell as Gtk.CellRendererText).Text = ((UniversDMX.FTransfer)o).ToString();
}
void RenderUniversName (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;
}
ListStore lsCbCircuits = new ListStore(typeof(Circuit));
void ConstruitCBCircuits ()
{
cbCircuit.Model = lsCbCircuits;
var cellCbCircuit = new CellRendererText();
cbCircuit.PackStart(cellCbCircuit,true);
cbCircuit.SetCellDataFunc(cellCbCircuit,new CellLayoutDataFunc(RenderCircuitName));
lsCbCircuits.AppendValues("toto");
foreach (Circuit c in Conduite.Courante.Circuits)
lsCbCircuits.AppendValues(c);
}
void RenderCircuitName (CellLayout cell_layout, CellRenderer cell, TreeModel tree_model, TreeIter iter)
{
Circuit c = tree_model.GetValue (iter, 0) as Circuit;
if(c != null)
(cell as Gtk.CellRendererText).Text = c.Name;
else
(cell as Gtk.CellRendererText).Text = "--Aucun--";
}
int currDimm=0;
ListStore lsCbFT = new ListStore(typeof(string),typeof(UniversDMX.FTransfer));
void ConstruitCBFT ()
{
var values = Enum.GetValues(typeof(UniversDMX.FTransfer));
cbFT.Model = lsCbFT;
var cellCbFt = new CellRendererText();
cbFT.PackStart(cellCbFt,true);
cbFT.SetCellDataFunc(cellCbFt,new CellLayoutDataFunc(RenderFTName));
foreach(var v in values)
lsCbFT.AppendValues( (UniversDMX.FTransfer)v );
}
protected void OnCbUniversChanged (object sender, EventArgs e)
{
TreeIter iter;
if(cbUnivers.GetActiveIter(out iter))
{
universEdite = lsCbUnivers.GetValue(iter,0) as UniversDMX;
}
}
protected void OnBtAddClicked (object sender, EventArgs e)
{
var dlg = new Dialog ("Nom ?", this, DialogFlags.Modal);
var entry = new Entry ("Nouvel Univers");
dlg.AddButton (Stock.Ok, ResponseType.Ok).GrabDefault ();
dlg.AddButton (Stock.Cancel, ResponseType.Cancel);
dlg.VBox.Add (new Label ("Nom de la nouvelle Conduite :"));
dlg.VBox.Add (entry);
dlg.VBox.ShowAll ();
entry.ActivatesDefault = true;
if ((ResponseType)dlg.Run () == ResponseType.Ok) {
UniversDMX univ = new UniversDMX ();
univ.Nom = entry.Text;
lsCbUnivers.AppendValues (univ);
Conduite.Courante.Patches.Add (univ);
}
dlg.Destroy();
}
protected void OnButtonCancelClicked (object sender, EventArgs e)
{
Destroy();
} }
} }
} }

View file

@ -25,11 +25,11 @@ namespace DMX2
protected void MajWidgets () protected void MajWidgets ()
{ {
if (Conduite.Courante != null) { if (Conduite.Courante != null) {
masterScale.Sensitive = seqLinAction.Sensitive = circAction.Sensitive = saveAction.Sensitive = saveAsAction.Sensitive = closeAction.Sensitive = true; showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive = seqLinAction.Sensitive = circAction.Sensitive = saveAction.Sensitive = saveAsAction.Sensitive = closeAction.Sensitive = true;
openAction.Sensitive = newAction.Sensitive = false; openAction.Sensitive = newAction.Sensitive = false;
this.Title = "DMX 2.0 - " + Conduite.Courante.Name; this.Title = "DMX 2.0 - " + Conduite.Courante.Name;
} else { } else {
masterScale.Sensitive = seqLinAction.Sensitive = circAction.Sensitive = saveAction.Sensitive = saveAsAction.Sensitive = closeAction.Sensitive = false; showAllAction.Sensitive = universAction.Sensitive = masterScale.Sensitive = seqLinAction.Sensitive = circAction.Sensitive = saveAction.Sensitive = saveAsAction.Sensitive = closeAction.Sensitive = false;
openAction.Sensitive = newAction.Sensitive = true; openAction.Sensitive = newAction.Sensitive = true;
this.Title = "DMX 2.0"; this.Title = "DMX 2.0";
} }
@ -158,5 +158,37 @@ namespace DMX2
isfullscreen = false; isfullscreen = false;
} }
} }
EditionUnivers uDlg = null;
protected void OnUniversActionActivated (object sender, EventArgs e)
{
if (uDlg != null) {
uDlg.Show();
return;
}
uDlg = new EditionUnivers(this);
uDlg.ShowAll();
uDlg.Destroyed += udlgDestroyed;
}
void udlgDestroyed (object sender, EventArgs e)
{
uDlg=null;
}
protected void OnShowAllActionActivated (object sender, EventArgs e)
{
foreach (Widget wid in new List<Widget>(seqUiVbox.Children))
seqUiVbox.Remove(wid);
foreach (Sequenceur s in Conduite.Courante.Sequenceurs)
seqUiVbox.Add(s.GetUI());
}
} }
} }

View file

@ -14,7 +14,7 @@ namespace DMX2
Nom = "Univers DMX n°"+ nb++.ToString(); Nom = "Univers DMX n°"+ nb++.ToString();
} }
Grada[] _gradas = new Grada[512]; Dimmer[] _dimmers = new Dimmer[512];
bool[] allumageForce = new bool[512]; bool[] allumageForce = new bool[512];
@ -29,17 +29,17 @@ namespace DMX2
log, log,
exp exp
} }
public struct Grada { public struct Dimmer {
public Circuit circuitAssocié; public Circuit circuitAssocié;
public FTransfer fonctionTransfert; public FTransfer fonctionTransfert;
public float param1; // Paramètres pour fonction de transfert public float param1; // Paramètres pour fonction de transfert
public float param2; public float param2;
} }
public Grada[] Gradas { public Dimmer[] Dimmers {
get get
{ {
return _gradas; return _dimmers;
} }
} }
@ -52,8 +52,8 @@ namespace DMX2
public void CalculUnivers(int[] valeurs) public void CalculUnivers(int[] valeurs)
{ {
Grada g; Dimmer g;
Debug.Assert(valeurs.Length == _gradas.Length); Debug.Assert(valeurs.Length == _dimmers.Length);
for(int i = 0 ; i<512; i++) for(int i = 0 ; i<512; i++)
{ {
if(allumageForce[i]) { if(allumageForce[i]) {
@ -61,7 +61,7 @@ namespace DMX2
break; break;
} }
g= _gradas[i]; g= _dimmers[i];
switch (g.fonctionTransfert) { switch (g.fonctionTransfert) {
case FTransfer.lineaire: case FTransfer.lineaire:

View file

@ -4,72 +4,356 @@ namespace DMX2
{ {
public partial class EditionUnivers public partial class EditionUnivers
{ {
private global::Gtk.UIManager UIManager;
private global::Gtk.HBox hbox2; private global::Gtk.HBox hbox2;
private global::Gtk.Button button162; private global::Gtk.Label label1;
private global::Gtk.Button button163; private global::Gtk.ComboBox cbUnivers;
private global::Gtk.HBox hbox3;
private global::Gtk.Button btAdd;
private global::Gtk.Button btDel;
private global::Gtk.Button btReset;
private global::Gtk.Button btPatchDroit;
private global::Gtk.HSeparator hseparator1;
private global::Gtk.HBox hbox1;
private global::Gtk.ToggleButton btAllume;
private global::Gtk.SpinButton spinDimmer;
private global::Gtk.Label label6;
private global::Gtk.ComboBox cbCircuit;
private global::Gtk.ComboBox cbFT;
private global::Gtk.Label lbParam1;
private global::Gtk.Entry txtParam1;
private global::Gtk.Label lbParam2;
private global::Gtk.Entry txtParam2;
private global::Gtk.Notebook notebook1;
private global::Gtk.ScrolledWindow GtkScrolledWindow; private global::Gtk.ScrolledWindow GtkScrolledWindow;
private global::Gtk.TreeView listeGradas; private global::Gtk.TreeView tvDimm;
private global::Gtk.Label label2;
private global::Gtk.ScrolledWindow GtkScrolledWindow1;
private global::Gtk.TreeView tvCircuits;
private global::Gtk.Label label5;
private global::Gtk.Button buttonCancel; private global::Gtk.Button buttonCancel;
protected virtual void Build () protected virtual void Build ()
{ {
global::Stetic.Gui.Initialize (this); global::Stetic.Gui.Initialize (this);
// Widget DMX2.EditionUnivers // Widget DMX2.EditionUnivers
this.UIManager = new global::Gtk.UIManager ();
global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default");
this.UIManager.InsertActionGroup (w1, 0);
this.AddAccelGroup (this.UIManager.AccelGroup);
this.Name = "DMX2.EditionUnivers"; this.Name = "DMX2.EditionUnivers";
this.TypeHint = ((global::Gdk.WindowTypeHint)(5));
this.WindowPosition = ((global::Gtk.WindowPosition)(4)); this.WindowPosition = ((global::Gtk.WindowPosition)(4));
// Internal child DMX2.EditionUnivers.VBox // Internal child DMX2.EditionUnivers.VBox
global::Gtk.VBox w1 = this.VBox; global::Gtk.VBox w2 = this.VBox;
w1.Name = "dialog1_VBox"; w2.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2)); w2.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild // Container child dialog1_VBox.Gtk.Box+BoxChild
this.hbox2 = new global::Gtk.HBox (); this.hbox2 = new global::Gtk.HBox ();
this.hbox2.Name = "hbox2"; this.hbox2.Name = "hbox2";
this.hbox2.Spacing = 6; this.hbox2.Spacing = 6;
// Container child hbox2.Gtk.Box+BoxChild // Container child hbox2.Gtk.Box+BoxChild
this.button162 = new global::Gtk.Button (); this.label1 = new global::Gtk.Label ();
this.button162.CanFocus = true; this.label1.Name = "label1";
this.button162.Name = "button162"; this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Univers :");
this.button162.UseUnderline = true; this.hbox2.Add (this.label1);
this.button162.Label = global::Mono.Unix.Catalog.GetString ("1 Circuit = 1 Grada"); global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label1]));
this.hbox2.Add (this.button162); w3.Position = 0;
global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.button162]));
w2.Position = 0;
w2.Expand = false;
w2.Fill = false;
// Container child hbox2.Gtk.Box+BoxChild
this.button163 = new global::Gtk.Button ();
this.button163.CanFocus = true;
this.button163.Name = "button163";
this.button163.UseUnderline = true;
this.button163.Label = global::Mono.Unix.Catalog.GetString ("Tout Réinitialiser");
this.hbox2.Add (this.button163);
global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.button163]));
w3.Position = 1;
w3.Expand = false; w3.Expand = false;
w3.Fill = false; w3.Fill = false;
w1.Add (this.hbox2); // Container child hbox2.Gtk.Box+BoxChild
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox2])); this.cbUnivers = global::Gtk.ComboBox.NewText ();
w4.Position = 0; this.cbUnivers.Name = "cbUnivers";
this.hbox2.Add (this.cbUnivers);
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.cbUnivers]));
w4.Position = 1;
w4.Expand = false; w4.Expand = false;
w4.Fill = false; w4.Fill = false;
// Container child hbox2.Gtk.Box+BoxChild
this.hbox3 = new global::Gtk.HBox ();
this.hbox3.Name = "hbox3";
this.hbox3.Spacing = 6;
// Container child hbox3.Gtk.Box+BoxChild
this.btAdd = new global::Gtk.Button ();
this.btAdd.CanFocus = true;
this.btAdd.Name = "btAdd";
this.btAdd.UseUnderline = true;
// Container child btAdd.Gtk.Container+ContainerChild
global::Gtk.Alignment w5 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w6 = new global::Gtk.HBox ();
w6.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w7 = new global::Gtk.Image ();
w7.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add", global::Gtk.IconSize.Menu);
w6.Add (w7);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w9 = new global::Gtk.Label ();
w9.LabelProp = global::Mono.Unix.Catalog.GetString ("Nouvel Univers");
w9.UseUnderline = true;
w6.Add (w9);
w5.Add (w6);
this.btAdd.Add (w5);
this.hbox3.Add (this.btAdd);
global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btAdd]));
w13.Position = 0;
w13.Expand = false;
w13.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.btDel = new global::Gtk.Button ();
this.btDel.Sensitive = false;
this.btDel.CanFocus = true;
this.btDel.Name = "btDel";
this.btDel.UseUnderline = true;
// Container child btDel.Gtk.Container+ContainerChild
global::Gtk.Alignment w14 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w15 = new global::Gtk.HBox ();
w15.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w16 = new global::Gtk.Image ();
w16.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-remove", global::Gtk.IconSize.Menu);
w15.Add (w16);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w18 = new global::Gtk.Label ();
w18.LabelProp = global::Mono.Unix.Catalog.GetString ("Supprimer");
w18.UseUnderline = true;
w15.Add (w18);
w14.Add (w15);
this.btDel.Add (w14);
this.hbox3.Add (this.btDel);
global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btDel]));
w22.Position = 1;
w22.Expand = false;
w22.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.btReset = new global::Gtk.Button ();
this.btReset.CanFocus = true;
this.btReset.Name = "btReset";
this.btReset.UseUnderline = true;
// Container child btReset.Gtk.Container+ContainerChild
global::Gtk.Alignment w23 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w24 = new global::Gtk.HBox ();
w24.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w25 = new global::Gtk.Image ();
w25.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-clear", global::Gtk.IconSize.Menu);
w24.Add (w25);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w27 = new global::Gtk.Label ();
w27.LabelProp = global::Mono.Unix.Catalog.GetString ("Réinitialiser");
w27.UseUnderline = true;
w24.Add (w27);
w23.Add (w24);
this.btReset.Add (w23);
this.hbox3.Add (this.btReset);
global::Gtk.Box.BoxChild w31 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btReset]));
w31.PackType = ((global::Gtk.PackType)(1));
w31.Position = 3;
w31.Expand = false;
w31.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.btPatchDroit = new global::Gtk.Button ();
this.btPatchDroit.CanFocus = true;
this.btPatchDroit.Name = "btPatchDroit";
this.btPatchDroit.UseUnderline = true;
// Container child btPatchDroit.Gtk.Container+ContainerChild
global::Gtk.Alignment w32 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w33 = new global::Gtk.HBox ();
w33.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w34 = new global::Gtk.Image ();
w34.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-sort-ascending", global::Gtk.IconSize.Menu);
w33.Add (w34);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w36 = new global::Gtk.Label ();
w36.LabelProp = global::Mono.Unix.Catalog.GetString ("Patch Droit");
w36.UseUnderline = true;
w33.Add (w36);
w32.Add (w33);
this.btPatchDroit.Add (w32);
this.hbox3.Add (this.btPatchDroit);
global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btPatchDroit]));
w40.PackType = ((global::Gtk.PackType)(1));
w40.Position = 4;
w40.Expand = false;
w40.Fill = false;
this.hbox2.Add (this.hbox3);
global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.hbox3]));
w41.Position = 2;
w2.Add (this.hbox2);
global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(w2 [this.hbox2]));
w42.Position = 0;
w42.Expand = false;
w42.Fill = false;
// Container child dialog1_VBox.Gtk.Box+BoxChild // Container child dialog1_VBox.Gtk.Box+BoxChild
this.hseparator1 = new global::Gtk.HSeparator ();
this.hseparator1.HeightRequest = 24;
this.hseparator1.Name = "hseparator1";
w2.Add (this.hseparator1);
global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(w2 [this.hseparator1]));
w43.Position = 1;
w43.Expand = false;
w43.Fill = false;
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.hbox1 = new global::Gtk.HBox ();
this.hbox1.Name = "hbox1";
this.hbox1.Spacing = 6;
// Container child hbox1.Gtk.Box+BoxChild
this.btAllume = new global::Gtk.ToggleButton ();
this.btAllume.CanFocus = true;
this.btAllume.Name = "btAllume";
this.btAllume.UseUnderline = true;
// Container child btAllume.Gtk.Container+ContainerChild
global::Gtk.Alignment w44 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w45 = new global::Gtk.HBox ();
w45.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w46 = new global::Gtk.Image ();
w46.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-find", global::Gtk.IconSize.Menu);
w45.Add (w46);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w48 = new global::Gtk.Label ();
w48.LabelProp = global::Mono.Unix.Catalog.GetString ("Allumer !");
w48.UseUnderline = true;
w45.Add (w48);
w44.Add (w45);
this.btAllume.Add (w44);
this.hbox1.Add (this.btAllume);
global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.btAllume]));
w52.Position = 0;
w52.Expand = false;
w52.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.spinDimmer = new global::Gtk.SpinButton (1, 512, 1);
this.spinDimmer.CanFocus = true;
this.spinDimmer.Name = "spinDimmer";
this.spinDimmer.Adjustment.PageIncrement = 10;
this.spinDimmer.ClimbRate = 1;
this.spinDimmer.Numeric = true;
this.spinDimmer.Value = 1;
this.hbox1.Add (this.spinDimmer);
global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.spinDimmer]));
w53.Position = 1;
w53.Expand = false;
w53.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.label6 = new global::Gtk.Label ();
this.label6.Name = "label6";
this.label6.LabelProp = global::Mono.Unix.Catalog.GetString ("Circuit :");
this.hbox1.Add (this.label6);
global::Gtk.Box.BoxChild w54 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label6]));
w54.Position = 2;
w54.Expand = false;
w54.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.cbCircuit = global::Gtk.ComboBox.NewText ();
this.cbCircuit.Name = "cbCircuit";
this.hbox1.Add (this.cbCircuit);
global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.cbCircuit]));
w55.Position = 3;
w55.Expand = false;
w55.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.cbFT = global::Gtk.ComboBox.NewText ();
this.cbFT.Name = "cbFT";
this.hbox1.Add (this.cbFT);
global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.cbFT]));
w56.Position = 4;
w56.Expand = false;
w56.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.lbParam1 = new global::Gtk.Label ();
this.lbParam1.Name = "lbParam1";
this.lbParam1.LabelProp = global::Mono.Unix.Catalog.GetString ("param 1");
this.hbox1.Add (this.lbParam1);
global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.lbParam1]));
w57.Position = 5;
w57.Expand = false;
w57.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.txtParam1 = new global::Gtk.Entry ();
this.txtParam1.CanFocus = true;
this.txtParam1.Name = "txtParam1";
this.txtParam1.IsEditable = true;
this.txtParam1.InvisibleChar = '•';
this.hbox1.Add (this.txtParam1);
global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.txtParam1]));
w58.Position = 6;
// Container child hbox1.Gtk.Box+BoxChild
this.lbParam2 = new global::Gtk.Label ();
this.lbParam2.Name = "lbParam2";
this.lbParam2.LabelProp = global::Mono.Unix.Catalog.GetString ("param2");
this.hbox1.Add (this.lbParam2);
global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.lbParam2]));
w59.Position = 7;
w59.Expand = false;
w59.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.txtParam2 = new global::Gtk.Entry ();
this.txtParam2.CanFocus = true;
this.txtParam2.Name = "txtParam2";
this.txtParam2.IsEditable = true;
this.txtParam2.InvisibleChar = '•';
this.hbox1.Add (this.txtParam2);
global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.txtParam2]));
w60.Position = 8;
w2.Add (this.hbox1);
global::Gtk.Box.BoxChild w61 = ((global::Gtk.Box.BoxChild)(w2 [this.hbox1]));
w61.Position = 2;
w61.Expand = false;
w61.Fill = false;
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.notebook1 = new global::Gtk.Notebook ();
this.notebook1.CanFocus = true;
this.notebook1.Name = "notebook1";
this.notebook1.CurrentPage = 0;
// Container child notebook1.Gtk.Notebook+NotebookChild
this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
this.listeGradas = new global::Gtk.TreeView (); this.tvDimm = new global::Gtk.TreeView ();
this.listeGradas.CanFocus = true; this.tvDimm.CanFocus = true;
this.listeGradas.Name = "listeGradas"; this.tvDimm.Name = "tvDimm";
this.GtkScrolledWindow.Add (this.listeGradas); this.GtkScrolledWindow.Add (this.tvDimm);
w1.Add (this.GtkScrolledWindow); this.notebook1.Add (this.GtkScrolledWindow);
global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1 [this.GtkScrolledWindow])); // Notebook tab
w6.Position = 1; this.label2 = new global::Gtk.Label ();
this.label2.Name = "label2";
this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("Patch");
this.notebook1.SetTabLabel (this.GtkScrolledWindow, this.label2);
this.label2.ShowAll ();
// Container child notebook1.Gtk.Notebook+NotebookChild
this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1));
// Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
this.tvCircuits = new global::Gtk.TreeView ();
this.tvCircuits.CanFocus = true;
this.tvCircuits.Name = "tvCircuits";
this.GtkScrolledWindow1.Add (this.tvCircuits);
this.notebook1.Add (this.GtkScrolledWindow1);
global::Gtk.Notebook.NotebookChild w65 = ((global::Gtk.Notebook.NotebookChild)(this.notebook1 [this.GtkScrolledWindow1]));
w65.Position = 1;
// Notebook tab
this.label5 = new global::Gtk.Label ();
this.label5.Name = "label5";
this.label5.LabelProp = global::Mono.Unix.Catalog.GetString ("Patch Rapide");
this.notebook1.SetTabLabel (this.GtkScrolledWindow1, this.label5);
this.label5.ShowAll ();
w2.Add (this.notebook1);
global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(w2 [this.notebook1]));
w66.Position = 3;
// Internal child DMX2.EditionUnivers.ActionArea // Internal child DMX2.EditionUnivers.ActionArea
global::Gtk.HButtonBox w7 = this.ActionArea; global::Gtk.HButtonBox w67 = this.ActionArea;
w7.Name = "dialog1_ActionArea"; w67.Name = "dialog1_ActionArea";
w7.Spacing = 10; w67.Spacing = 10;
w7.BorderWidth = ((uint)(5)); w67.BorderWidth = ((uint)(5));
w7.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); w67.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonCancel = new global::Gtk.Button (); this.buttonCancel = new global::Gtk.Button ();
this.buttonCancel.CanDefault = true; this.buttonCancel.CanDefault = true;
@ -79,15 +363,18 @@ namespace DMX2
this.buttonCancel.UseUnderline = true; this.buttonCancel.UseUnderline = true;
this.buttonCancel.Label = "gtk-close"; this.buttonCancel.Label = "gtk-close";
this.AddActionWidget (this.buttonCancel, -7); this.AddActionWidget (this.buttonCancel, -7);
global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7 [this.buttonCancel])); global::Gtk.ButtonBox.ButtonBoxChild w68 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w67 [this.buttonCancel]));
w8.Expand = false; w68.Expand = false;
w8.Fill = false; w68.Fill = false;
if ((this.Child != null)) { if ((this.Child != null)) {
this.Child.ShowAll (); this.Child.ShowAll ();
} }
this.DefaultWidth = 704; this.DefaultWidth = 771;
this.DefaultHeight = 483; this.DefaultHeight = 483;
this.Show (); this.Show ();
this.cbUnivers.Changed += new global::System.EventHandler (this.OnCbUniversChanged);
this.btAdd.Clicked += new global::System.EventHandler (this.OnBtAddClicked);
this.buttonCancel.Clicked += new global::System.EventHandler (this.OnButtonCancelClicked);
} }
} }
} }

View file

@ -18,7 +18,8 @@ namespace DMX2
private global::Gtk.Action seqLinAction; private global::Gtk.Action seqLinAction;
private global::Gtk.Action fullscreenAction; private global::Gtk.Action fullscreenAction;
private global::Gtk.Action fullscreenAction1; private global::Gtk.Action fullscreenAction1;
private global::Gtk.Action ShowAllAction; private global::Gtk.Action showAllAction;
private global::Gtk.Action universAction;
private global::Gtk.VBox vbox1; private global::Gtk.VBox vbox1;
private global::Gtk.HBox hbox1; private global::Gtk.HBox hbox1;
private global::Gtk.VBox vbox2; private global::Gtk.VBox vbox2;
@ -85,9 +86,14 @@ namespace DMX2
w1.Add (this.fullscreenAction, null); w1.Add (this.fullscreenAction, null);
this.fullscreenAction1 = new global::Gtk.Action ("fullscreenAction1", null, null, "gtk-fullscreen"); this.fullscreenAction1 = new global::Gtk.Action ("fullscreenAction1", null, null, "gtk-fullscreen");
w1.Add (this.fullscreenAction1, null); w1.Add (this.fullscreenAction1, null);
this.ShowAllAction = new global::Gtk.Action ("ShowAllAction", global::Mono.Unix.Catalog.GetString ("ShowAll"), null, null); this.showAllAction = new global::Gtk.Action ("showAllAction", global::Mono.Unix.Catalog.GetString ("ShowAll"), null, "gtk-refresh");
this.ShowAllAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("ShowAll"); this.showAllAction.Sensitive = false;
w1.Add (this.ShowAllAction, null); this.showAllAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("ShowAll");
w1.Add (this.showAllAction, null);
this.universAction = new global::Gtk.Action ("universAction", global::Mono.Unix.Catalog.GetString ("Univers"), null, "gtk-execute");
this.universAction.Sensitive = false;
this.universAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Univers");
w1.Add (this.universAction, null);
this.UIManager.InsertActionGroup (w1, 0); this.UIManager.InsertActionGroup (w1, 0);
this.AddAccelGroup (this.UIManager.AccelGroup); this.AddAccelGroup (this.UIManager.AccelGroup);
this.Name = "DMX2.MainWindow"; this.Name = "DMX2.MainWindow";
@ -335,7 +341,7 @@ namespace DMX2
this.hbox4.Name = "hbox4"; this.hbox4.Name = "hbox4";
this.hbox4.Spacing = 6; this.hbox4.Spacing = 6;
// Container child hbox4.Gtk.Box+BoxChild // Container child hbox4.Gtk.Box+BoxChild
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar7'><toolitem name='circAction' action='circAction'/><toolitem name='seqLinAction' action='seqLinAction'/><separator/><toolitem name='ShowAllAction' action='ShowAllAction'/><toolitem name='fullscreenAction1' action='fullscreenAction1'/></toolbar></ui>"); this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar7'><toolitem name='circAction' action='circAction'/><toolitem name='seqLinAction' action='seqLinAction'/><separator/><toolitem name='showAllAction' action='showAllAction'/><toolitem name='fullscreenAction1' action='fullscreenAction1'/><toolitem name='universAction' action='universAction'/></toolbar></ui>");
this.toolbar7 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar7"))); this.toolbar7 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar7")));
this.toolbar7.Name = "toolbar7"; this.toolbar7.Name = "toolbar7";
this.toolbar7.ShowArrow = false; this.toolbar7.ShowArrow = false;
@ -381,6 +387,8 @@ namespace DMX2
this.newAction.Activated += new global::System.EventHandler (this.OnNewActionActivated); this.newAction.Activated += new global::System.EventHandler (this.OnNewActionActivated);
this.seqLinAction.Activated += new global::System.EventHandler (this.OnSeqLinActionActivated); this.seqLinAction.Activated += new global::System.EventHandler (this.OnSeqLinActionActivated);
this.fullscreenAction1.Activated += new global::System.EventHandler (this.OnFullscreenAction1Activated); this.fullscreenAction1.Activated += new global::System.EventHandler (this.OnFullscreenAction1Activated);
this.showAllAction.Activated += new global::System.EventHandler (this.OnShowAllActionActivated);
this.universAction.Activated += new global::System.EventHandler (this.OnUniversActionActivated);
this.masterScale.ValueChanged += new global::System.EventHandler (this.OnMasterScaleValueChanged); this.masterScale.ValueChanged += new global::System.EventHandler (this.OnMasterScaleValueChanged);
} }
} }

View file

@ -143,10 +143,21 @@
<property name="StockId">gtk-fullscreen</property> <property name="StockId">gtk-fullscreen</property>
<signal name="Activated" handler="OnFullscreenAction1Activated" /> <signal name="Activated" handler="OnFullscreenAction1Activated" />
</action> </action>
<action id="ShowAllAction"> <action id="showAllAction">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes">ShowAll</property> <property name="Label" translatable="yes">ShowAll</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">ShowAll</property> <property name="ShortLabel" translatable="yes">ShowAll</property>
<property name="StockId">gtk-refresh</property>
<signal name="Activated" handler="OnShowAllActionActivated" />
</action>
<action id="universAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Univers</property>
<property name="Sensitive">False</property>
<property name="ShortLabel" translatable="yes">Univers</property>
<property name="StockId">gtk-execute</property>
<signal name="Activated" handler="OnUniversActionActivated" />
</action> </action>
</action-group> </action-group>
<property name="MemberName" /> <property name="MemberName" />
@ -410,8 +421,9 @@
<node type="Toolitem" action="circAction" /> <node type="Toolitem" action="circAction" />
<node type="Toolitem" action="seqLinAction" /> <node type="Toolitem" action="seqLinAction" />
<node type="Separator" /> <node type="Separator" />
<node type="Toolitem" action="ShowAllAction" /> <node type="Toolitem" action="showAllAction" />
<node type="Toolitem" action="fullscreenAction1" /> <node type="Toolitem" action="fullscreenAction1" />
<node type="Toolitem" action="universAction" />
</node> </node>
</widget> </widget>
<packing> <packing>
@ -1042,8 +1054,10 @@
</widget> </widget>
</child> </child>
</widget> </widget>
<widget class="Gtk.Dialog" id="DMX2.EditionUnivers" design-size="704 483"> <widget class="Gtk.Dialog" id="DMX2.EditionUnivers" design-size="771 483">
<action-group name="Default" />
<property name="MemberName" /> <property name="MemberName" />
<property name="TypeHint">Utility</property>
<property name="WindowPosition">CenterOnParent</property> <property name="WindowPosition">CenterOnParent</property>
<property name="Buttons">1</property> <property name="Buttons">1</property>
<property name="HelpButton">False</property> <property name="HelpButton">False</property>
@ -1056,22 +1070,322 @@
<property name="MemberName" /> <property name="MemberName" />
<property name="Spacing">6</property> <property name="Spacing">6</property>
<child> <child>
<placeholder /> <widget class="Gtk.Label" id="label1">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">Univers :</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>
<child> <child>
<placeholder /> <widget class="Gtk.ComboBox" id="cbUnivers">
<property name="MemberName" />
<property name="IsTextCombo">True</property>
<property name="Items" translatable="yes" />
<signal name="Changed" handler="OnCbUniversChanged" />
</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>
<child> <child>
<placeholder /> <widget class="Gtk.HBox" id="hbox3">
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
<widget class="Gtk.Button" id="btAdd">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-add Menu</property>
<property name="Label" translatable="yes">Nouvel Univers</property>
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnBtAddClicked" />
</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.Button" id="btDel">
<property name="MemberName" />
<property name="Sensitive">False</property>
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-remove Menu</property>
<property name="Label" translatable="yes">Supprimer</property>
<property name="UseUnderline">True</property>
</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>
<placeholder />
</child>
<child>
<widget class="Gtk.Button" id="btReset">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-clear Menu</property>
<property name="Label" translatable="yes">Réinitialiser</property>
<property name="UseUnderline">True</property>
</widget>
<packing>
<property name="PackType">End</property>
<property name="Position">3</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.Button" id="btPatchDroit">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-sort-ascending Menu</property>
<property name="Label" translatable="yes">Patch Droit</property>
<property name="UseUnderline">True</property>
</widget>
<packing>
<property name="PackType">End</property>
<property name="Position">4</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="Position">2</property>
<property name="AutoSize">True</property>
</packing>
</child> </child>
</widget> </widget>
<packing> <packing>
<property name="Position">0</property> <property name="Position">0</property>
<property name="AutoSize">True</property> <property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing> </packing>
</child> </child>
<child> <child>
<placeholder /> <widget class="Gtk.HSeparator" id="hseparator1">
<property name="MemberName" />
<property name="HeightRequest">24</property>
</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.HBox" id="hbox1">
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
<widget class="Gtk.ToggleButton" id="btAllume">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-find Menu</property>
<property name="Label" translatable="yes">Allumer !</property>
<property name="UseUnderline">True</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="spinDimmer">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Lower">1</property>
<property name="Upper">512</property>
<property name="PageIncrement">10</property>
<property name="StepIncrement">1</property>
<property name="ClimbRate">1</property>
<property name="Numeric">True</property>
<property name="Value">1</property>
</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.Label" id="label6">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">Circuit :</property>
</widget>
<packing>
<property name="Position">2</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.ComboBox" id="cbCircuit">
<property name="MemberName" />
<property name="IsTextCombo">True</property>
<property name="Items" translatable="yes" />
</widget>
<packing>
<property name="Position">3</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.ComboBox" id="cbFT">
<property name="MemberName" />
<property name="IsTextCombo">True</property>
<property name="Items" translatable="yes" />
</widget>
<packing>
<property name="Position">4</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.Label" id="lbParam1">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">param 1</property>
</widget>
<packing>
<property name="Position">5</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.Entry" id="txtParam1">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="IsEditable">True</property>
<property name="InvisibleChar">•</property>
</widget>
<packing>
<property name="Position">6</property>
<property name="AutoSize">True</property>
</packing>
</child>
<child>
<widget class="Gtk.Label" id="lbParam2">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">param2</property>
</widget>
<packing>
<property name="Position">7</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.Entry" id="txtParam2">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="IsEditable">True</property>
<property name="InvisibleChar">•</property>
</widget>
<packing>
<property name="Position">8</property>
<property name="AutoSize">True</property>
</packing>
</child>
</widget>
<packing>
<property name="Position">2</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.Notebook" id="notebook1">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="CurrentPage">0</property>
<child>
<widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
<property name="MemberName" />
<property name="ShadowType">In</property>
<child>
<widget class="Gtk.TreeView" id="tvDimm">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="ShowScrollbars">True</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="Gtk.Label" id="label2">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">Patch</property>
</widget>
<packing>
<property name="type">tab</property>
</packing>
</child>
<child>
<widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
<property name="MemberName" />
<property name="ShadowType">In</property>
<child>
<widget class="Gtk.TreeView" id="tvCircuits">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="ShowScrollbars">True</property>
</widget>
</child>
</widget>
<packing>
<property name="Position">1</property>
</packing>
</child>
<child>
<widget class="Gtk.Label" id="label5">
<property name="MemberName" />
<property name="LabelProp" translatable="yes">Patch Rapide</property>
</widget>
<packing>
<property name="type">tab</property>
</packing>
</child>
</widget>
<packing>
<property name="Position">3</property>
<property name="AutoSize">True</property>
</packing>
</child> </child>
</widget> </widget>
</child> </child>
@ -1091,6 +1405,7 @@
<property name="Type">StockItem</property> <property name="Type">StockItem</property>
<property name="StockId">gtk-close</property> <property name="StockId">gtk-close</property>
<property name="ResponseId">-7</property> <property name="ResponseId">-7</property>
<signal name="Clicked" handler="OnButtonCancelClicked" />
<property name="label">gtk-close</property> <property name="label">gtk-close</property>
</widget> </widget>
<packing> <packing>