This commit is contained in:
manu 2013-08-17 21:14:30 +00:00
parent f698ab599f
commit 5a0db0c56e
6 changed files with 89 additions and 92 deletions

View file

@ -5,6 +5,8 @@ namespace DMX2
{ {
class MainClass class MainClass
{ {
public static void Main (string[] args) public static void Main (string[] args)
{ {

View file

@ -25,6 +25,7 @@ namespace DMX2
protected void MajWidgets () protected void MajWidgets ()
{ {
if (Conduite.Courante != null) { if (Conduite.Courante != null) {
//Activation / Désactivation des boutons en fonction de l'état de la counduite courante
showAllAction.Sensitive = universAction.Sensitive = 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;
@ -89,7 +90,11 @@ namespace DMX2
} }
MajWidgets(); MajWidgets();
dlg.Destroy(); dlg.Destroy();
} }
protected void OnCloseActionActivated (object sender, EventArgs e) protected void OnCloseActionActivated (object sender, EventArgs e)
{ {
Conduite.Courante.Dispose(); Conduite.Courante.Dispose();
@ -97,6 +102,7 @@ namespace DMX2
MajWidgets(); MajWidgets();
} }
// bonton ajout de sequenceur linéraire
protected void OnSeqLinActionActivated (object sender, EventArgs e) protected void OnSeqLinActionActivated (object sender, EventArgs e)
{ {
Sequenceur s = new SequenceurLineaire(); Sequenceur s = new SequenceurLineaire();
@ -106,8 +112,9 @@ namespace DMX2
void AddSeqUI (Sequenceur s) void AddSeqUI (Sequenceur s)
{ {
seqUiVbox.PackStart(s.GetUI(),false,false,0); VBox newvbox = new VBox();
seqUiVbox.ShowAll(); onglets.Add (newvbox);
onglets.ShowAll();
} }
@ -133,8 +140,10 @@ namespace DMX2
void Update (object sender, EventArgs e) void Update (object sender, EventArgs e)
{ {
foreach (var sequi in seqUiVbox.Children) { foreach (var notebookvbox in onglets.Children) {
(sequi as SequenceurUI).Update(fullUpdateFlag); foreach (var sequi in (notebookvbox as VBox).Children) {
(sequi as SequenceurUI).Update (fullUpdateFlag);
}
} }
MajCircuits(fullUpdateFlag); MajCircuits(fullUpdateFlag);
fullUpdateFlag=false; fullUpdateFlag=false;
@ -181,11 +190,15 @@ namespace DMX2
protected void OnShowAllActionActivated (object sender, EventArgs e) protected void OnShowAllActionActivated (object sender, EventArgs e)
{ {
foreach (Widget wid in new List<Widget>(seqUiVbox.Children)) foreach (var notebookvbox in onglets.Children)
seqUiVbox.Remove(wid); notebookvbox.Destroy();
foreach (Sequenceur s in Conduite.Courante.Sequenceurs) foreach (Sequenceur s in Conduite.Courante.Sequenceurs) {
seqUiVbox.Add(s.GetUI()); VBox newvbox = new VBox();
newvbox.Add(s.GetUI());
onglets.Add (newvbox);
onglets.ShowAll();
}
} }
protected void OnConnectActionActivated (object sender, EventArgs e) protected void OnConnectActionActivated (object sender, EventArgs e)

View file

@ -180,7 +180,7 @@ namespace DMX2
protected void OnCloseActionActivated (object sender, EventArgs e) protected void OnCloseActionActivated (object sender, EventArgs e)
{ {
Destroy(); this.Parent.Destroy();
} }

View file

@ -310,7 +310,7 @@ namespace DMX2
this.notebook1 = new global::Gtk.Notebook (); this.notebook1 = new global::Gtk.Notebook ();
this.notebook1.CanFocus = true; this.notebook1.CanFocus = true;
this.notebook1.Name = "notebook1"; this.notebook1.Name = "notebook1";
this.notebook1.CurrentPage = 0; this.notebook1.CurrentPage = 1;
// Container child notebook1.Gtk.Notebook+NotebookChild // 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";

View file

@ -34,9 +34,8 @@ namespace DMX2
private global::Gtk.HPaned hpaned1; private global::Gtk.HPaned hpaned1;
private global::Gtk.HPaned hpaned2; private global::Gtk.HPaned hpaned2;
private global::Gtk.ScrolledWindow GtkScrolledWindow2; private global::Gtk.ScrolledWindow GtkScrolledWindow2;
private global::Gtk.NodeView nodeview1; private global::Gtk.NodeView MatriceUI;
private global::Gtk.ScrolledWindow GtkScrolledWindow; private global::Gtk.Notebook onglets;
private global::Gtk.VBox seqUiVbox;
private global::Gtk.ScrolledWindow scrolledwindow2; private global::Gtk.ScrolledWindow scrolledwindow2;
private global::Gtk.VBox vboxCircuits; private global::Gtk.VBox vboxCircuits;
private global::Gtk.HSeparator hseparator1; private global::Gtk.HSeparator hseparator1;
@ -83,9 +82,11 @@ namespace DMX2
this.seqLinAction = new global::Gtk.Action ("seqLinAction", null, null, "tirettes"); this.seqLinAction = new global::Gtk.Action ("seqLinAction", null, null, "tirettes");
this.seqLinAction.Sensitive = false; this.seqLinAction.Sensitive = false;
w1.Add (this.seqLinAction, null); w1.Add (this.seqLinAction, null);
this.fullscreenAction = new global::Gtk.Action ("fullscreenAction", null, null, "gtk-fullscreen"); this.fullscreenAction = new global::Gtk.Action ("fullscreenAction", global::Mono.Unix.Catalog.GetString ("_Plein écran"), null, "gtk-fullscreen");
this.fullscreenAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Plein écran");
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", global::Mono.Unix.Catalog.GetString ("_Plein écran"), null, "gtk-fullscreen");
this.fullscreenAction1.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Plein écran");
w1.Add (this.fullscreenAction1, null); w1.Add (this.fullscreenAction1, null);
this.showAllAction = new global::Gtk.Action ("showAllAction", global::Mono.Unix.Catalog.GetString ("ShowAll"), null, "gtk-refresh"); this.showAllAction = new global::Gtk.Action ("showAllAction", global::Mono.Unix.Catalog.GetString ("ShowAll"), null, "gtk-refresh");
this.showAllAction.Sensitive = false; this.showAllAction.Sensitive = false;
@ -102,6 +103,7 @@ namespace DMX2
this.Name = "DMX2.MainWindow"; this.Name = "DMX2.MainWindow";
this.Title = global::Mono.Unix.Catalog.GetString ("MainWindow"); this.Title = global::Mono.Unix.Catalog.GetString ("MainWindow");
this.WindowPosition = ((global::Gtk.WindowPosition)(4)); this.WindowPosition = ((global::Gtk.WindowPosition)(4));
this.BorderWidth = ((uint)(3));
// Container child DMX2.MainWindow.Gtk.Container+ContainerChild // Container child DMX2.MainWindow.Gtk.Container+ContainerChild
this.vbox1 = new global::Gtk.VBox (); this.vbox1 = new global::Gtk.VBox ();
this.vbox1.Name = "vbox1"; this.vbox1.Name = "vbox1";
@ -268,7 +270,7 @@ namespace DMX2
this.hpaned1 = new global::Gtk.HPaned (); this.hpaned1 = new global::Gtk.HPaned ();
this.hpaned1.CanFocus = true; this.hpaned1.CanFocus = true;
this.hpaned1.Name = "hpaned1"; this.hpaned1.Name = "hpaned1";
this.hpaned1.Position = 781; this.hpaned1.Position = 776;
// Container child hpaned1.Gtk.Paned+PanedChild // Container child hpaned1.Gtk.Paned+PanedChild
this.hpaned2 = new global::Gtk.HPaned (); this.hpaned2 = new global::Gtk.HPaned ();
this.hpaned2.CanFocus = true; this.hpaned2.CanFocus = true;
@ -279,30 +281,22 @@ namespace DMX2
this.GtkScrolledWindow2.Name = "GtkScrolledWindow2"; this.GtkScrolledWindow2.Name = "GtkScrolledWindow2";
this.GtkScrolledWindow2.ShadowType = ((global::Gtk.ShadowType)(1)); this.GtkScrolledWindow2.ShadowType = ((global::Gtk.ShadowType)(1));
// Container child GtkScrolledWindow2.Gtk.Container+ContainerChild // Container child GtkScrolledWindow2.Gtk.Container+ContainerChild
this.nodeview1 = new global::Gtk.NodeView (); this.MatriceUI = new global::Gtk.NodeView ();
this.nodeview1.CanFocus = true; this.MatriceUI.CanFocus = true;
this.nodeview1.Name = "nodeview1"; this.MatriceUI.Name = "MatriceUI";
this.GtkScrolledWindow2.Add (this.nodeview1); this.GtkScrolledWindow2.Add (this.MatriceUI);
this.hpaned2.Add (this.GtkScrolledWindow2); this.hpaned2.Add (this.GtkScrolledWindow2);
global::Gtk.Paned.PanedChild w51 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.GtkScrolledWindow2])); global::Gtk.Paned.PanedChild w51 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.GtkScrolledWindow2]));
w51.Resize = false; w51.Resize = false;
// Container child hpaned2.Gtk.Paned+PanedChild // Container child hpaned2.Gtk.Paned+PanedChild
this.GtkScrolledWindow = new global::Gtk.ScrolledWindow (); this.onglets = new global::Gtk.Notebook ();
this.GtkScrolledWindow.Name = "GtkScrolledWindow"; this.onglets.CanFocus = true;
this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); this.onglets.Name = "onglets";
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild this.onglets.CurrentPage = 0;
global::Gtk.Viewport w52 = new global::Gtk.Viewport (); this.hpaned2.Add (this.onglets);
w52.ShadowType = ((global::Gtk.ShadowType)(0));
// Container child GtkViewport.Gtk.Container+ContainerChild
this.seqUiVbox = new global::Gtk.VBox ();
this.seqUiVbox.Name = "seqUiVbox";
this.seqUiVbox.Spacing = 6;
w52.Add (this.seqUiVbox);
this.GtkScrolledWindow.Add (w52);
this.hpaned2.Add (this.GtkScrolledWindow);
this.hpaned1.Add (this.hpaned2); this.hpaned1.Add (this.hpaned2);
global::Gtk.Paned.PanedChild w56 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2])); global::Gtk.Paned.PanedChild w53 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2]));
w56.Resize = false; w53.Resize = false;
// Container child hpaned1.Gtk.Paned+PanedChild // Container child hpaned1.Gtk.Paned+PanedChild
this.scrolledwindow2 = new global::Gtk.ScrolledWindow (); this.scrolledwindow2 = new global::Gtk.ScrolledWindow ();
this.scrolledwindow2.WidthRequest = 150; this.scrolledwindow2.WidthRequest = 150;
@ -310,32 +304,32 @@ namespace DMX2
this.scrolledwindow2.Name = "scrolledwindow2"; this.scrolledwindow2.Name = "scrolledwindow2";
this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1)); this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1));
// Container child scrolledwindow2.Gtk.Container+ContainerChild // Container child scrolledwindow2.Gtk.Container+ContainerChild
global::Gtk.Viewport w57 = new global::Gtk.Viewport (); global::Gtk.Viewport w54 = new global::Gtk.Viewport ();
w57.ShadowType = ((global::Gtk.ShadowType)(0)); w54.ShadowType = ((global::Gtk.ShadowType)(0));
// Container child GtkViewport1.Gtk.Container+ContainerChild // Container child GtkViewport1.Gtk.Container+ContainerChild
this.vboxCircuits = new global::Gtk.VBox (); this.vboxCircuits = new global::Gtk.VBox ();
this.vboxCircuits.Name = "vboxCircuits"; this.vboxCircuits.Name = "vboxCircuits";
this.vboxCircuits.Spacing = 2; this.vboxCircuits.Spacing = 2;
w57.Add (this.vboxCircuits); w54.Add (this.vboxCircuits);
this.scrolledwindow2.Add (w57); this.scrolledwindow2.Add (w54);
this.hpaned1.Add (this.scrolledwindow2); this.hpaned1.Add (this.scrolledwindow2);
global::Gtk.Paned.PanedChild w60 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2])); global::Gtk.Paned.PanedChild w57 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2]));
w60.Resize = false; w57.Resize = false;
w60.Shrink = false; w57.Shrink = false;
this.hbox1.Add (this.hpaned1); this.hbox1.Add (this.hpaned1);
global::Gtk.Box.BoxChild w61 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1])); global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1]));
w61.Position = 2; w58.Position = 2;
this.vbox1.Add (this.hbox1); this.vbox1.Add (this.hbox1);
global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1])); global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
w62.Position = 0; w59.Position = 0;
// Container child vbox1.Gtk.Box+BoxChild // Container child vbox1.Gtk.Box+BoxChild
this.hseparator1 = new global::Gtk.HSeparator (); this.hseparator1 = new global::Gtk.HSeparator ();
this.hseparator1.Name = "hseparator1"; this.hseparator1.Name = "hseparator1";
this.vbox1.Add (this.hseparator1); this.vbox1.Add (this.hseparator1);
global::Gtk.Box.BoxChild w63 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1])); global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1]));
w63.Position = 1; w60.Position = 1;
w63.Expand = false; w60.Expand = false;
w63.Fill = false; w60.Fill = false;
// Container child vbox1.Gtk.Box+BoxChild // Container child vbox1.Gtk.Box+BoxChild
this.hbox4 = new global::Gtk.HBox (); this.hbox4 = new global::Gtk.HBox ();
this.hbox4.Name = "hbox4"; this.hbox4.Name = "hbox4";
@ -346,17 +340,17 @@ namespace DMX2
this.toolbar7.Name = "toolbar7"; this.toolbar7.Name = "toolbar7";
this.toolbar7.ShowArrow = false; this.toolbar7.ShowArrow = false;
this.hbox4.Add (this.toolbar7); this.hbox4.Add (this.toolbar7);
global::Gtk.Box.BoxChild w64 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7])); global::Gtk.Box.BoxChild w61 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7]));
w64.Position = 0; w61.Position = 0;
w64.Expand = false; w61.Expand = false;
w64.Fill = false; w61.Fill = false;
// Container child hbox4.Gtk.Box+BoxChild // Container child hbox4.Gtk.Box+BoxChild
this.fixed5 = new global::Gtk.Fixed (); this.fixed5 = new global::Gtk.Fixed ();
this.fixed5.Name = "fixed5"; this.fixed5.Name = "fixed5";
this.fixed5.HasWindow = false; this.fixed5.HasWindow = false;
this.hbox4.Add (this.fixed5); this.hbox4.Add (this.fixed5);
global::Gtk.Box.BoxChild w65 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.fixed5])); global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.fixed5]));
w65.Position = 1; w62.Position = 1;
// Container child hbox4.Gtk.Box+BoxChild // Container child hbox4.Gtk.Box+BoxChild
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar8'><toolitem name='newAction' action='newAction'/><toolitem name='openAction' action='openAction'/><toolitem name='saveAction' action='saveAction'/><toolitem name='saveAsAction' action='saveAsAction'/><toolitem name='closeAction' action='closeAction'/><toolitem name='quitAction' action='quitAction'/></toolbar></ui>"); this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar8'><toolitem name='newAction' action='newAction'/><toolitem name='openAction' action='openAction'/><toolitem name='saveAction' action='saveAction'/><toolitem name='saveAsAction' action='saveAsAction'/><toolitem name='closeAction' action='closeAction'/><toolitem name='quitAction' action='quitAction'/></toolbar></ui>");
this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8"))); this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8")));
@ -364,15 +358,15 @@ namespace DMX2
this.toolbar8.ShowArrow = false; this.toolbar8.ShowArrow = false;
this.toolbar8.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.toolbar8.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
this.hbox4.Add (this.toolbar8); this.hbox4.Add (this.toolbar8);
global::Gtk.Box.BoxChild w66 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8])); global::Gtk.Box.BoxChild w63 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8]));
w66.Position = 2; w63.Position = 2;
w66.Expand = false; w63.Expand = false;
w66.Fill = false; w63.Fill = false;
this.vbox1.Add (this.hbox4); this.vbox1.Add (this.hbox4);
global::Gtk.Box.BoxChild w67 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4])); global::Gtk.Box.BoxChild w64 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4]));
w67.Position = 2; w64.Position = 2;
w67.Expand = false; w64.Expand = false;
w67.Fill = false; w64.Fill = false;
this.Add (this.vbox1); this.Add (this.vbox1);
if ((this.Child != null)) { if ((this.Child != null)) {
this.Child.ShowAll (); this.Child.ShowAll ();

View file

@ -134,12 +134,14 @@
</action> </action>
<action id="fullscreenAction"> <action id="fullscreenAction">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes">_Plein écran</property>
<property name="ShortLabel" translatable="yes">_Plein écran</property>
<property name="StockId">gtk-fullscreen</property> <property name="StockId">gtk-fullscreen</property>
</action> </action>
<action id="fullscreenAction1"> <action id="fullscreenAction1">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes">_Plein écran</property>
<property name="ShortLabel" translatable="yes">_Plein écran</property>
<property name="StockId">gtk-fullscreen</property> <property name="StockId">gtk-fullscreen</property>
<signal name="Activated" handler="OnFullscreenAction1Activated" /> <signal name="Activated" handler="OnFullscreenAction1Activated" />
</action> </action>
@ -169,6 +171,7 @@
<property name="MemberName" /> <property name="MemberName" />
<property name="Title" translatable="yes">MainWindow</property> <property name="Title" translatable="yes">MainWindow</property>
<property name="WindowPosition">CenterOnParent</property> <property name="WindowPosition">CenterOnParent</property>
<property name="BorderWidth">3</property>
<signal name="DeleteEvent" handler="OnDeleteEvent" /> <signal name="DeleteEvent" handler="OnDeleteEvent" />
<child> <child>
<widget class="Gtk.VBox" id="vbox1"> <widget class="Gtk.VBox" id="vbox1">
@ -306,7 +309,7 @@
<widget class="Gtk.HPaned" id="hpaned1"> <widget class="Gtk.HPaned" id="hpaned1">
<property name="MemberName" /> <property name="MemberName" />
<property name="CanFocus">True</property> <property name="CanFocus">True</property>
<property name="Position">781</property> <property name="Position">776</property>
<child> <child>
<widget class="Gtk.HPaned" id="hpaned2"> <widget class="Gtk.HPaned" id="hpaned2">
<property name="MemberName" /> <property name="MemberName" />
@ -317,7 +320,7 @@
<property name="MemberName" /> <property name="MemberName" />
<property name="ShadowType">In</property> <property name="ShadowType">In</property>
<child> <child>
<widget class="Gtk.NodeView" id="nodeview1"> <widget class="Gtk.NodeView" id="MatriceUI">
<property name="MemberName" /> <property name="MemberName" />
<property name="CanFocus">True</property> <property name="CanFocus">True</property>
<property name="ShowScrollbars">True</property> <property name="ShowScrollbars">True</property>
@ -329,31 +332,16 @@
</packing> </packing>
</child> </child>
<child> <child>
<widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow"> <widget class="Gtk.Notebook" id="onglets">
<property name="MemberName" /> <property name="MemberName" />
<property name="ShadowType">In</property> <property name="CanFocus">True</property>
<child> <property name="CurrentPage">0</property>
<widget class="Gtk.Viewport" id="GtkViewport">
<property name="MemberName" />
<property name="ShadowType">None</property>
<child>
<widget class="Gtk.VBox" id="seqUiVbox">
<property name="MemberName" />
<property name="ShowScrollbars">True</property>
<property name="Spacing">6</property>
<child> <child>
<placeholder /> <placeholder />
</child> </child>
<child> <child>
<placeholder /> <placeholder />
</child> </child>
<child>
<placeholder />
</child>
</widget>
</child>
</widget>
</child>
</widget> </widget>
</child> </child>
</widget> </widget>
@ -1392,7 +1380,7 @@
<widget class="Gtk.Notebook" id="notebook1"> <widget class="Gtk.Notebook" id="notebook1">
<property name="MemberName" /> <property name="MemberName" />
<property name="CanFocus">True</property> <property name="CanFocus">True</property>
<property name="CurrentPage">0</property> <property name="CurrentPage">1</property>
<child> <child>
<widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow"> <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
<property name="MemberName" /> <property name="MemberName" />