diff --git a/DMX-2.0/EditionUnivers.cs b/DMX-2.0/EditionUnivers.cs index fd1685b..3ede688 100644 --- a/DMX-2.0/EditionUnivers.cs +++ b/DMX-2.0/EditionUnivers.cs @@ -5,20 +5,120 @@ namespace DMX2 public partial class EditionUnivers : Gtk.Dialog { 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 (); - universEdite = univers; - - ConstruitListe(); + ConstruitCBUnivers(); + ConstruitCBCircuits(); + 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(); } } } - diff --git a/DMX-2.0/MainWindow.cs b/DMX-2.0/MainWindow.cs index 4eef422..1e5e64f 100644 --- a/DMX-2.0/MainWindow.cs +++ b/DMX-2.0/MainWindow.cs @@ -25,11 +25,11 @@ namespace DMX2 protected void MajWidgets () { 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; this.Title = "DMX 2.0 - " + Conduite.Courante.Name; } 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; this.Title = "DMX 2.0"; } @@ -158,5 +158,37 @@ namespace DMX2 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(seqUiVbox.Children)) + seqUiVbox.Remove(wid); + + foreach (Sequenceur s in Conduite.Courante.Sequenceurs) + seqUiVbox.Add(s.GetUI()); + + } + + } } \ No newline at end of file diff --git a/DMX-2.0/UniversDMX.cs b/DMX-2.0/UniversDMX.cs index 21dae3e..7eb8820 100644 --- a/DMX-2.0/UniversDMX.cs +++ b/DMX-2.0/UniversDMX.cs @@ -14,7 +14,7 @@ namespace DMX2 Nom = "Univers DMX n°"+ nb++.ToString(); } - Grada[] _gradas = new Grada[512]; + Dimmer[] _dimmers = new Dimmer[512]; bool[] allumageForce = new bool[512]; @@ -29,17 +29,17 @@ namespace DMX2 log, exp } - public struct Grada { + public struct Dimmer { public Circuit circuitAssocié; public FTransfer fonctionTransfert; public float param1; // Paramètres pour fonction de transfert public float param2; } - public Grada[] Gradas { + public Dimmer[] Dimmers { get { - return _gradas; + return _dimmers; } } @@ -52,8 +52,8 @@ namespace DMX2 public void CalculUnivers(int[] valeurs) { - Grada g; - Debug.Assert(valeurs.Length == _gradas.Length); + Dimmer g; + Debug.Assert(valeurs.Length == _dimmers.Length); for(int i = 0 ; i<512; i++) { if(allumageForce[i]) { @@ -61,7 +61,7 @@ namespace DMX2 break; } - g= _gradas[i]; + g= _dimmers[i]; switch (g.fonctionTransfert) { case FTransfer.lineaire: diff --git a/DMX-2.0/gtk-gui/DMX2.EditionUnivers.cs b/DMX-2.0/gtk-gui/DMX2.EditionUnivers.cs index 15c7da9..da86fd0 100644 --- a/DMX-2.0/gtk-gui/DMX2.EditionUnivers.cs +++ b/DMX-2.0/gtk-gui/DMX2.EditionUnivers.cs @@ -4,72 +4,356 @@ namespace DMX2 { public partial class EditionUnivers { + private global::Gtk.UIManager UIManager; private global::Gtk.HBox hbox2; - private global::Gtk.Button button162; - private global::Gtk.Button button163; + private global::Gtk.Label label1; + 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.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; protected virtual void Build () { global::Stetic.Gui.Initialize (this); // 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.TypeHint = ((global::Gdk.WindowTypeHint)(5)); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); // Internal child DMX2.EditionUnivers.VBox - global::Gtk.VBox w1 = this.VBox; - w1.Name = "dialog1_VBox"; - w1.BorderWidth = ((uint)(2)); + global::Gtk.VBox w2 = this.VBox; + w2.Name = "dialog1_VBox"; + w2.BorderWidth = ((uint)(2)); // Container child dialog1_VBox.Gtk.Box+BoxChild this.hbox2 = new global::Gtk.HBox (); this.hbox2.Name = "hbox2"; this.hbox2.Spacing = 6; // Container child hbox2.Gtk.Box+BoxChild - this.button162 = new global::Gtk.Button (); - this.button162.CanFocus = true; - this.button162.Name = "button162"; - this.button162.UseUnderline = true; - this.button162.Label = global::Mono.Unix.Catalog.GetString ("1 Circuit = 1 Grada"); - this.hbox2.Add (this.button162); - 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; + this.label1 = new global::Gtk.Label (); + this.label1.Name = "label1"; + this.label1.LabelProp = global::Mono.Unix.Catalog.GetString ("Univers :"); + this.hbox2.Add (this.label1); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label1])); + w3.Position = 0; w3.Expand = false; w3.Fill = false; - w1.Add (this.hbox2); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox2])); - w4.Position = 0; + // Container child hbox2.Gtk.Box+BoxChild + this.cbUnivers = global::Gtk.ComboBox.NewText (); + 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.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 + 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.Name = "GtkScrolledWindow"; this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - this.listeGradas = new global::Gtk.TreeView (); - this.listeGradas.CanFocus = true; - this.listeGradas.Name = "listeGradas"; - this.GtkScrolledWindow.Add (this.listeGradas); - w1.Add (this.GtkScrolledWindow); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1 [this.GtkScrolledWindow])); - w6.Position = 1; + this.tvDimm = new global::Gtk.TreeView (); + this.tvDimm.CanFocus = true; + this.tvDimm.Name = "tvDimm"; + this.GtkScrolledWindow.Add (this.tvDimm); + this.notebook1.Add (this.GtkScrolledWindow); + // Notebook tab + 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 - global::Gtk.HButtonBox w7 = this.ActionArea; - w7.Name = "dialog1_ActionArea"; - w7.Spacing = 10; - w7.BorderWidth = ((uint)(5)); - w7.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + global::Gtk.HButtonBox w67 = this.ActionArea; + w67.Name = "dialog1_ActionArea"; + w67.Spacing = 10; + w67.BorderWidth = ((uint)(5)); + w67.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild this.buttonCancel = new global::Gtk.Button (); this.buttonCancel.CanDefault = true; @@ -79,15 +363,18 @@ namespace DMX2 this.buttonCancel.UseUnderline = true; this.buttonCancel.Label = "gtk-close"; this.AddActionWidget (this.buttonCancel, -7); - global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7 [this.buttonCancel])); - w8.Expand = false; - w8.Fill = false; + global::Gtk.ButtonBox.ButtonBoxChild w68 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w67 [this.buttonCancel])); + w68.Expand = false; + w68.Fill = false; if ((this.Child != null)) { this.Child.ShowAll (); } - this.DefaultWidth = 704; + this.DefaultWidth = 771; this.DefaultHeight = 483; 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); } } } diff --git a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs index 42361f3..2e9e9f9 100644 --- a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs +++ b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs @@ -18,7 +18,8 @@ namespace DMX2 private global::Gtk.Action seqLinAction; private global::Gtk.Action fullscreenAction; 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.HBox hbox1; private global::Gtk.VBox vbox2; @@ -85,9 +86,14 @@ namespace DMX2 w1.Add (this.fullscreenAction, null); this.fullscreenAction1 = new global::Gtk.Action ("fullscreenAction1", null, null, "gtk-fullscreen"); w1.Add (this.fullscreenAction1, null); - this.ShowAllAction = new global::Gtk.Action ("ShowAllAction", global::Mono.Unix.Catalog.GetString ("ShowAll"), null, null); - this.ShowAllAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("ShowAll"); - w1.Add (this.ShowAllAction, null); + this.showAllAction = new global::Gtk.Action ("showAllAction", global::Mono.Unix.Catalog.GetString ("ShowAll"), null, "gtk-refresh"); + this.showAllAction.Sensitive = false; + 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.AddAccelGroup (this.UIManager.AccelGroup); this.Name = "DMX2.MainWindow"; @@ -335,7 +341,7 @@ namespace DMX2 this.hbox4.Name = "hbox4"; this.hbox4.Spacing = 6; // Container child hbox4.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); + this.UIManager.AddUiFromString (""); this.toolbar7 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar7"))); this.toolbar7.Name = "toolbar7"; this.toolbar7.ShowArrow = false; @@ -381,6 +387,8 @@ namespace DMX2 this.newAction.Activated += new global::System.EventHandler (this.OnNewActionActivated); this.seqLinAction.Activated += new global::System.EventHandler (this.OnSeqLinActionActivated); 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); } } diff --git a/DMX-2.0/gtk-gui/gui.stetic b/DMX-2.0/gtk-gui/gui.stetic index 4515355..3de47a9 100644 --- a/DMX-2.0/gtk-gui/gui.stetic +++ b/DMX-2.0/gtk-gui/gui.stetic @@ -143,10 +143,21 @@ gtk-fullscreen - + Action ShowAll + False ShowAll + gtk-refresh + + + + Action + Univers + False + Univers + gtk-execute + @@ -410,8 +421,9 @@ - + + @@ -1042,8 +1054,10 @@ - + + + Utility CenterOnParent 1 False @@ -1056,22 +1070,322 @@ 6 - + + + Univers : + + + 0 + True + False + False + - + + + True + + + + + 1 + True + False + False + - + + + 6 + + + + True + TextAndIcon + stock:gtk-add Menu + Nouvel Univers + True + + + + 0 + True + False + False + + + + + + False + True + TextAndIcon + stock:gtk-remove Menu + Supprimer + True + + + 1 + True + False + False + + + + + + + + + True + TextAndIcon + stock:gtk-clear Menu + Réinitialiser + True + + + End + 3 + True + False + False + + + + + + True + TextAndIcon + stock:gtk-sort-ascending Menu + Patch Droit + True + + + End + 4 + True + False + False + + + + + 2 + True + 0 True + False + False - + + + 24 + + + 1 + True + False + False + + + + + + 6 + + + + True + TextAndIcon + stock:gtk-find Menu + Allumer ! + True + + + 0 + True + False + False + + + + + + True + 1 + 512 + 10 + 1 + 1 + True + 1 + + + 1 + True + False + False + + + + + + Circuit : + + + 2 + True + False + False + + + + + + True + + + + 3 + True + False + False + + + + + + True + + + + 4 + True + False + False + + + + + + param 1 + + + 5 + True + False + False + + + + + + True + True + + + + 6 + True + + + + + + param2 + + + 7 + True + False + False + + + + + + True + True + + + + 8 + True + + + + + 2 + True + False + False + + + + + + True + 0 + + + + In + + + + True + True + + + + + + + + Patch + + + tab + + + + + + In + + + + True + True + + + + + 1 + + + + + + Patch Rapide + + + tab + + + + + 3 + True + @@ -1091,6 +1405,7 @@ StockItem gtk-close -7 + gtk-close