Sequenceur son début

This commit is contained in:
tzim 2014-12-01 16:29:10 +00:00
parent 6468c288dd
commit d14c1e7768
7 changed files with 612 additions and 125 deletions

View file

@ -46,11 +46,14 @@
</Reference> </Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f"> <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<Private>False</Private> <Private>False</Private>
<Package>gtk-sharp-2.0</Package> <Package>gtk-sharp-2.0</Package>
</Reference> </Reference>
<Reference Include="gstreamer-sharp, Version=0.9.2.0, Culture=neutral, PublicKeyToken=4956b48baf980190">
<Private>False</Private>
<Package>gstreamer-sharp-0.10</Package>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="gtk-gui\gui.stetic"> <EmbeddedResource Include="gtk-gui\gui.stetic">
@ -150,7 +153,6 @@
<Compile Include="DriverBoitierV2.cs" /> <Compile Include="DriverBoitierV2.cs" />
<Compile Include="DriverBoitierV2UI.cs" /> <Compile Include="DriverBoitierV2UI.cs" />
<Compile Include="gtk-gui\DMX2.DriverBoitierV2UI.cs" /> <Compile Include="gtk-gui\DMX2.DriverBoitierV2UI.cs" />
<Compile Include="WebServer.cs" />
<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" />
@ -192,5 +194,6 @@
<None Include="html\css\theme\images\ui-icons_ef8c08_256x240.png" /> <None Include="html\css\theme\images\ui-icons_ef8c08_256x240.png" />
<None Include="html\css\theme\images\ui-icons_ffd27a_256x240.png" /> <None Include="html\css\theme\images\ui-icons_ffd27a_256x240.png" />
<None Include="html\css\theme\images\ui-icons_ffffff_256x240.png" /> <None Include="html\css\theme\images\ui-icons_ffffff_256x240.png" />
<None Include="WebServer.cs" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -26,7 +26,7 @@ namespace DMX2
public static void Main (string[] args) public static void Main (string[] args)
{ {
bool fullscreen = false; bool fullscreen = false;
WebServer ws = null; bool webserv = false; //WebServer ws = null; bool webserv = false;
System.IO.FileInfo openfile=null; System.IO.FileInfo openfile=null;
// Traitement des options en ligne de commande : // Traitement des options en ligne de commande :
@ -37,9 +37,9 @@ namespace DMX2
case "fs": case "fs":
fullscreen = true; fullscreen = true;
break; break;
case "ws": /*case "ws":
webserv = true; webserv = true;
break; break; */
default: default:
if(System.IO.File.Exists(arg)) if(System.IO.File.Exists(arg))
openfile = new System.IO.FileInfo(arg); openfile = new System.IO.FileInfo(arg);
@ -47,7 +47,7 @@ namespace DMX2
} }
} }
if(webserv) ws = new WebServer(); //if(webserv) ws = new WebServer();
// Initialisation GTK# // Initialisation GTK#
Application.Init (); Application.Init ();
@ -86,7 +86,7 @@ namespace DMX2
Conduite.Courante.Dispose (); Conduite.Courante.Dispose ();
} }
if(ws!=null) ws.Dispose(); //if(ws!=null) ws.Dispose();
} }
static void HandleUnhandledException (GLib.UnhandledExceptionArgs args) static void HandleUnhandledException (GLib.UnhandledExceptionArgs args)

View file

@ -444,7 +444,7 @@ namespace DMX2
protected void OnOpenActionActivated (object sender, EventArgs e) protected void OnOpenActionActivated (object sender, EventArgs e)
{ {
FileChooserDialog fcd = new FileChooserDialog ("Sauver sous ...", this, FileChooserAction.Open, FileChooserDialog fcd = new FileChooserDialog ("Ouvrir ...", this, FileChooserAction.Open,
"Annuler", ResponseType.Cancel, "Annuler", ResponseType.Cancel,
"Ouvrir", ResponseType.Accept); "Ouvrir", ResponseType.Accept);

View file

@ -25,15 +25,156 @@ namespace DMX2
[System.ComponentModel.ToolboxItem(true)] [System.ComponentModel.ToolboxItem(true)]
public partial class SeqSonUI : SequenceurUI public partial class SeqSonUI : SequenceurUI
{ {
ListStore lsFiles = null;
SequenceurSon sequenceur;
public void buildListFiles ()
{
lsFiles = new ListStore(typeof(string));
listFiles.EnableGridLines= TreeViewGridLines.Both;
var idCol = new Gtk.TreeViewColumn ();
var idCell = new Gtk.CellRendererText ();
idCol.Title = "N°";
idCol.PackStart (idCell, true);
idCol.SetCellDataFunc (idCell, new Gtk.TreeCellDataFunc (RenderNum));
listFiles.AppendColumn (idCol);
var fileCol = new Gtk.TreeViewColumn ();
var fileCell = new Gtk.CellRendererText ();
fileCol.Title = "Nom";
fileCol.PackStart (fileCell, true);
fileCol.SetCellDataFunc (fileCell, new Gtk.TreeCellDataFunc (RenderFile));
listFiles.AppendColumn (fileCol);
listFiles.Model = lsFiles;
}
void UpdListFiles ()
{
lsFiles.Clear();
foreach (var file in sequenceur.Files) {
lsFiles.AppendValues(file);
}
}
void RenderNum (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
{
if (Conduite.Courante==null) return;
string num=string.Empty;
string l = tree_model.GetValue (iter, 0) as string;
if( sequenceur.CurFile == l )
num+= "->";
(cell as Gtk.CellRendererText).Text = num + (sequenceur.Files.IndexOf(l)+1).ToString();
}
void RenderFile (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
{
if (Conduite.Courante==null) return;
string l = tree_model.GetValue (iter, 0) as string;
(cell as Gtk.CellRendererText).Text = l;
}
public SeqSonUI (SequenceurSon s):base(s) public SeqSonUI (SequenceurSon s):base(s)
{ {
this.Build (); this.Build ();
sequenceur = s;
buildListFiles();
} }
#region implemented abstract members of DMX2.SequenceurUI #region implemented abstract members of DMX2.SequenceurUI
public override void Update (bool full) public override void Update (bool full)
{ {
//throw new System.NotImplementedException (); //throw new System.NotImplementedException ();
} }
int IndexSelection()
{
var sel = listFiles.Selection.GetSelectedRows();
if(sel.Length ==0) return -1;
return listFiles.Selection.GetSelectedRows()[0].Indices[0];
}
protected void OnActAddFileActivated (object sender, EventArgs e)
{
FileChooserDialog fcd = new FileChooserDialog ("Ouvrir ...", this.Parent as Gtk.Window,
FileChooserAction.Open,
"Annuler", ResponseType.Cancel,
"Ouvrir", ResponseType.Accept);
fcd.SelectMultiple = true;
/*fcd.Filter = new FileFilter ();
fcd.Filter.AddPattern ("*.mp3");*/
if ((ResponseType)fcd.Run () == ResponseType.Cancel || fcd.Filename == null) {
fcd.Destroy ();
return;
}
int pos = IndexSelection ();
foreach (var file in fcd.Filenames) {
pos = sequenceur.AddFile (pos + 1, file );
if(sequenceur.CurFile.Equals(string.Empty))
sequenceur.Index=0;
}
fcd.Destroy ();
UpdListFiles();
}
protected void OnActDelFileActivated (object sender, EventArgs e)
{
int pos = IndexSelection();
if (pos==-1) return;
sequenceur.DelFile(pos);
UpdListFiles();
}
protected void OnBtnNextClicked (object sender, EventArgs e)
{
sequenceur.Index+=1;
listFiles.QueueDraw();
}
protected void OnBtnPlayClicked (object sender, EventArgs e)
{
sequenceur.Play();
}
protected void OnBtnPauseClicked (object sender, EventArgs e)
{
sequenceur.Pause();
}
protected void OnBtnStopClicked (object sender, EventArgs e)
{
sequenceur.Stop();
}
protected void OnBtnPrevClicked (object sender, EventArgs e)
{
sequenceur.Index-=1;
listFiles.QueueDraw();
}
protected void OnBtnRewindPressed (object sender, EventArgs e)
{
Console.WriteLine("Rew Pressed");
}
protected void OnBtnRewindReleased (object sender, EventArgs e)
{
Console.WriteLine("Rew Released");
}
protected void OnBtnForwardPressed (object sender, EventArgs e)
{
Console.WriteLine("FF Pressed");
}
protected void OnBtnForwardReleased (object sender, EventArgs e)
{
Console.WriteLine("FF Released");
}
#endregion #endregion
} }

View file

@ -29,8 +29,101 @@ namespace DMX2
SeqSonUI ui=null; SeqSonUI ui=null;
static bool gsinit=false;
List<string> files = new List<string>();
string curfile = string.Empty;
Gst.Element element = null;
public ReadOnlyCollection<string> Files {
get {
return files.AsReadOnly();
}
}
public string CurFile {
get{return curfile; }
}
public int Index {
get {
return files.IndexOf (curfile);
}
set {
if(value>=0 && value< files.Count)
LoadFile(value);
}
}
public int AddFile (int pos, string file)
{
lock (this) {
files.Insert (pos, file);
//CommandAdd(pos);
return pos;
}
}
public void DelFile (int pos)
{
lock (this) {
files.RemoveAt (pos);
//CommandRemove(pos);
}
}
void LoadFile (int pos)
{
curfile = files[pos];
if (element != null) {
element.SetState(Gst.State.Null);
element.Dispose();
}
Uri uri = new Uri(curfile);
element = Gst.ElementFactory.Make("playbin2");
element["uri"] = uri.AbsoluteUri;
element.SetState(Gst.State.Paused);
}
public void Play ()
{
if(element == null)return;
element.SetState(Gst.State.Playing);
}
public void Pause ()
{
if(element == null)return;
element.SetState(Gst.State.Paused);
}
public void Stop ()
{
element.SetState(Gst.State.Null);
element.Dispose();
element=null;
}
public void MoveTo(ulong pos){
}
static void GstInit ()
{
if(gsinit) return;
gsinit=true;
string[] args = new string[] {"--gst-disable-segtrap"};
Gst.Application.Init("dmx2", ref args );
}
public SequenceurSon () public SequenceurSon ()
{ {
GstInit();
} }
#region implemented abstract members of DMX2.Sequenceur #region implemented abstract members of DMX2.Sequenceur
public override SequenceurUI GetUI () public override SequenceurUI GetUI ()

View file

@ -13,8 +13,8 @@ namespace DMX2
private global::Gtk.Action mediaRewindAction; private global::Gtk.Action mediaRewindAction;
private global::Gtk.Action mediaForwardAction; private global::Gtk.Action mediaForwardAction;
private global::Gtk.Action mediaNextAction; private global::Gtk.Action mediaNextAction;
private global::Gtk.Action addAction; private global::Gtk.Action actAddFile;
private global::Gtk.Action removeAction; private global::Gtk.Action actDelFile;
private global::Gtk.Action preferencesAction; private global::Gtk.Action preferencesAction;
private global::Gtk.Action closeAction1; private global::Gtk.Action closeAction1;
private global::Gtk.Action preferencesAction1; private global::Gtk.Action preferencesAction1;
@ -29,16 +29,21 @@ namespace DMX2
private global::Gtk.Label actLabel; private global::Gtk.Label actLabel;
private global::Gtk.Label timeLabel; private global::Gtk.Label timeLabel;
private global::Gtk.ProgressBar progressbar1; private global::Gtk.ProgressBar progressbar1;
private global::Gtk.Toolbar toolbar2; private global::Gtk.HBox hbox3;
private global::Gtk.HBox hbox4; private global::Gtk.Button btnPlay;
private global::Gtk.Toolbar toolbar3; private global::Gtk.Button btnPause;
private global::Gtk.Button btnStop;
private global::Gtk.Button btnPrev;
private global::Gtk.Button btnRewind;
private global::Gtk.Button btnForward;
private global::Gtk.Button btnNext;
private global::Gtk.Entry entry1; private global::Gtk.Entry entry1;
private global::Gtk.Button button133; private global::Gtk.Button button133;
private global::Gtk.VScale vscale1; private global::Gtk.VScale vscale1;
private global::Gtk.Toolbar toolbar4; private global::Gtk.Toolbar toolbar4;
private global::Gtk.ScrolledWindow GtkScrolledWindow; private global::Gtk.ScrolledWindow GtkScrolledWindow;
private global::Gtk.NodeView nodeview1; private global::Gtk.NodeView listFiles;
private global::Gtk.Label GtkLabel3; private global::Gtk.Label GtkLabel9;
protected virtual void Build () protected virtual void Build ()
{ {
@ -63,10 +68,10 @@ namespace DMX2
w2.Add (this.mediaForwardAction, null); w2.Add (this.mediaForwardAction, null);
this.mediaNextAction = new global::Gtk.Action ("mediaNextAction", null, null, "gtk-media-next"); this.mediaNextAction = new global::Gtk.Action ("mediaNextAction", null, null, "gtk-media-next");
w2.Add (this.mediaNextAction, null); w2.Add (this.mediaNextAction, null);
this.addAction = new global::Gtk.Action ("addAction", null, null, "gtk-add"); this.actAddFile = new global::Gtk.Action ("actAddFile", null, null, "gtk-add");
w2.Add (this.addAction, null); w2.Add (this.actAddFile, null);
this.removeAction = new global::Gtk.Action ("removeAction", null, null, "gtk-remove"); this.actDelFile = new global::Gtk.Action ("actDelFile", null, null, "gtk-remove");
w2.Add (this.removeAction, null); w2.Add (this.actDelFile, null);
this.preferencesAction = new global::Gtk.Action ("preferencesAction", null, null, "gtk-preferences"); this.preferencesAction = new global::Gtk.Action ("preferencesAction", null, null, "gtk-preferences");
w2.Add (this.preferencesAction, null); w2.Add (this.preferencesAction, null);
this.closeAction1 = new global::Gtk.Action ("closeAction1", null, null, "gtk-close"); this.closeAction1 = new global::Gtk.Action ("closeAction1", null, null, "gtk-close");
@ -153,59 +158,205 @@ namespace DMX2
w8.Expand = false; w8.Expand = false;
w8.Fill = false; w8.Fill = false;
// Container child vbox3.Gtk.Box+BoxChild // Container child vbox3.Gtk.Box+BoxChild
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar2'><toolitem name='mediaPlayAction' action='mediaPlayAction'/><toolitem name='mediaPauseAction' action='mediaPauseAction'/><toolitem name='mediaStopAction' action='mediaStopAction'/><toolitem name='mediaPreviousAction' action='mediaPreviousAction'/><toolitem name='mediaRewindAction' action='mediaRewindAction'/><toolitem name='mediaForwardAction' action='mediaForwardAction'/><toolitem name='mediaNextAction' action='mediaNextAction'/></toolbar></ui>"); this.hbox3 = new global::Gtk.HBox ();
this.toolbar2 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar2"))); this.hbox3.Name = "hbox3";
this.toolbar2.Name = "toolbar2"; this.hbox3.Spacing = 6;
this.toolbar2.ShowArrow = false; // Container child hbox3.Gtk.Box+BoxChild
this.toolbar2.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.btnPlay = new global::Gtk.Button ();
this.toolbar2.IconSize = ((global::Gtk.IconSize)(2)); this.btnPlay.CanFocus = true;
this.vbox3.Add (this.toolbar2); this.btnPlay.Name = "btnPlay";
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.toolbar2])); this.btnPlay.UseUnderline = true;
w9.Position = 2; // Container child btnPlay.Gtk.Container+ContainerChild
w9.Expand = false; global::Gtk.Alignment w9 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
w9.Fill = false; // Container child GtkAlignment.Gtk.Container+ContainerChild
// Container child vbox3.Gtk.Box+BoxChild global::Gtk.HBox w10 = new global::Gtk.HBox ();
this.hbox4 = new global::Gtk.HBox (); w10.Spacing = 2;
this.hbox4.Name = "hbox4"; // Container child GtkHBox.Gtk.Container+ContainerChild
this.hbox4.Spacing = 6; global::Gtk.Image w11 = new global::Gtk.Image ();
// Container child hbox4.Gtk.Box+BoxChild w11.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-play", global::Gtk.IconSize.Button);
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar3'><toolitem name='addAction' action='addAction'/><toolitem name='removeAction' action='removeAction'/></toolbar></ui>"); w10.Add (w11);
this.toolbar3 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar3"))); // Container child GtkHBox.Gtk.Container+ContainerChild
this.toolbar3.Name = "toolbar3"; global::Gtk.Label w13 = new global::Gtk.Label ();
this.toolbar3.ShowArrow = false; w10.Add (w13);
this.toolbar3.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); w9.Add (w10);
this.toolbar3.IconSize = ((global::Gtk.IconSize)(2)); this.btnPlay.Add (w9);
this.hbox4.Add (this.toolbar3); this.hbox3.Add (this.btnPlay);
global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar3])); global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnPlay]));
w10.Position = 0; w17.Position = 0;
// Container child hbox4.Gtk.Box+BoxChild w17.Expand = false;
w17.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.btnPause = new global::Gtk.Button ();
this.btnPause.CanFocus = true;
this.btnPause.Name = "btnPause";
this.btnPause.UseUnderline = true;
// Container child btnPause.Gtk.Container+ContainerChild
global::Gtk.Alignment w18 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w19 = new global::Gtk.HBox ();
w19.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w20 = new global::Gtk.Image ();
w20.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-pause", global::Gtk.IconSize.Button);
w19.Add (w20);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w22 = new global::Gtk.Label ();
w19.Add (w22);
w18.Add (w19);
this.btnPause.Add (w18);
this.hbox3.Add (this.btnPause);
global::Gtk.Box.BoxChild w26 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnPause]));
w26.Position = 1;
w26.Expand = false;
w26.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.btnStop = new global::Gtk.Button ();
this.btnStop.CanFocus = true;
this.btnStop.Name = "btnStop";
this.btnStop.UseUnderline = true;
// Container child btnStop.Gtk.Container+ContainerChild
global::Gtk.Alignment w27 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w28 = new global::Gtk.HBox ();
w28.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w29 = new global::Gtk.Image ();
w29.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-stop", global::Gtk.IconSize.Button);
w28.Add (w29);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w31 = new global::Gtk.Label ();
w28.Add (w31);
w27.Add (w28);
this.btnStop.Add (w27);
this.hbox3.Add (this.btnStop);
global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnStop]));
w35.Position = 2;
w35.Expand = false;
w35.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.btnPrev = new global::Gtk.Button ();
this.btnPrev.CanFocus = true;
this.btnPrev.Name = "btnPrev";
this.btnPrev.UseUnderline = true;
// Container child btnPrev.Gtk.Container+ContainerChild
global::Gtk.Alignment w36 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w37 = new global::Gtk.HBox ();
w37.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w38 = new global::Gtk.Image ();
w38.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-previous", global::Gtk.IconSize.Button);
w37.Add (w38);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w40 = new global::Gtk.Label ();
w37.Add (w40);
w36.Add (w37);
this.btnPrev.Add (w36);
this.hbox3.Add (this.btnPrev);
global::Gtk.Box.BoxChild w44 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnPrev]));
w44.Position = 3;
w44.Expand = false;
w44.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.btnRewind = new global::Gtk.Button ();
this.btnRewind.CanFocus = true;
this.btnRewind.Name = "btnRewind";
this.btnRewind.UseUnderline = true;
// Container child btnRewind.Gtk.Container+ContainerChild
global::Gtk.Alignment w45 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w46 = new global::Gtk.HBox ();
w46.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w47 = new global::Gtk.Image ();
w47.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-rewind", global::Gtk.IconSize.Button);
w46.Add (w47);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w49 = new global::Gtk.Label ();
w46.Add (w49);
w45.Add (w46);
this.btnRewind.Add (w45);
this.hbox3.Add (this.btnRewind);
global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnRewind]));
w53.Position = 4;
w53.Expand = false;
w53.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.btnForward = new global::Gtk.Button ();
this.btnForward.CanFocus = true;
this.btnForward.Name = "btnForward";
this.btnForward.UseUnderline = true;
// Container child btnForward.Gtk.Container+ContainerChild
global::Gtk.Alignment w54 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w55 = new global::Gtk.HBox ();
w55.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w56 = new global::Gtk.Image ();
w56.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-forward", global::Gtk.IconSize.Button);
w55.Add (w56);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w58 = new global::Gtk.Label ();
w55.Add (w58);
w54.Add (w55);
this.btnForward.Add (w54);
this.hbox3.Add (this.btnForward);
global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnForward]));
w62.Position = 5;
w62.Expand = false;
w62.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.btnNext = new global::Gtk.Button ();
this.btnNext.CanFocus = true;
this.btnNext.Name = "btnNext";
this.btnNext.UseUnderline = true;
// Container child btnNext.Gtk.Container+ContainerChild
global::Gtk.Alignment w63 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w64 = new global::Gtk.HBox ();
w64.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w65 = new global::Gtk.Image ();
w65.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-media-next", global::Gtk.IconSize.Button);
w64.Add (w65);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w67 = new global::Gtk.Label ();
w64.Add (w67);
w63.Add (w64);
this.btnNext.Add (w63);
this.hbox3.Add (this.btnNext);
global::Gtk.Box.BoxChild w71 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.btnNext]));
w71.Position = 6;
w71.Expand = false;
w71.Fill = false;
// Container child hbox3.Gtk.Box+BoxChild
this.entry1 = new global::Gtk.Entry (); this.entry1 = new global::Gtk.Entry ();
this.entry1.CanFocus = true; this.entry1.CanFocus = true;
this.entry1.Name = "entry1"; this.entry1.Name = "entry1";
this.entry1.IsEditable = true; this.entry1.IsEditable = true;
this.entry1.InvisibleChar = '•'; this.entry1.InvisibleChar = '•';
this.hbox4.Add (this.entry1); this.hbox3.Add (this.entry1);
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.entry1])); global::Gtk.Box.BoxChild w72 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.entry1]));
w11.Position = 1; w72.Position = 7;
// Container child hbox4.Gtk.Box+BoxChild // Container child hbox3.Gtk.Box+BoxChild
this.button133 = new global::Gtk.Button (); this.button133 = new global::Gtk.Button ();
this.button133.CanFocus = true; this.button133.CanFocus = true;
this.button133.Name = "button133"; this.button133.Name = "button133";
this.button133.UseUnderline = true; this.button133.UseUnderline = true;
this.button133.Label = "GoTo"; this.button133.Label = "GoTo";
this.hbox4.Add (this.button133); this.hbox3.Add (this.button133);
global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.button133])); global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.button133]));
w12.Position = 2; w73.Position = 8;
w12.Expand = false; w73.Expand = false;
w12.Fill = false; w73.Fill = false;
this.vbox3.Add (this.hbox4); this.vbox3.Add (this.hbox3);
global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox4])); global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.hbox3]));
w13.Position = 3; w74.Position = 2;
w13.Expand = false; w74.Expand = false;
w13.Fill = false; w74.Fill = false;
this.hbox1.Add (this.vbox3); this.hbox1.Add (this.vbox3);
global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3])); global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
w14.Position = 0; w75.Position = 0;
// Container child hbox1.Gtk.Box+BoxChild // Container child hbox1.Gtk.Box+BoxChild
this.vscale1 = new global::Gtk.VScale (null); this.vscale1 = new global::Gtk.VScale (null);
this.vscale1.WidthRequest = 20; this.vscale1.WidthRequest = 20;
@ -220,12 +371,12 @@ namespace DMX2
this.vscale1.Digits = 0; this.vscale1.Digits = 0;
this.vscale1.ValuePos = ((global::Gtk.PositionType)(3)); this.vscale1.ValuePos = ((global::Gtk.PositionType)(3));
this.hbox1.Add (this.vscale1); this.hbox1.Add (this.vscale1);
global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vscale1])); global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vscale1]));
w15.Position = 1; w76.Position = 1;
w15.Expand = false; w76.Expand = false;
w15.Fill = false; w76.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild // Container child hbox1.Gtk.Box+BoxChild
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar4'><toolitem name='closeAction1' action='closeAction1'/></toolbar></ui>"); this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar4'><toolitem name='closeAction1' action='closeAction1'/><toolitem name='actAddFile' action='actAddFile'/><toolitem name='actDelFile' action='actDelFile'/></toolbar></ui>");
this.toolbar4 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar4"))); this.toolbar4 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar4")));
this.toolbar4.Name = "toolbar4"; this.toolbar4.Name = "toolbar4";
this.toolbar4.Orientation = ((global::Gtk.Orientation)(1)); this.toolbar4.Orientation = ((global::Gtk.Orientation)(1));
@ -233,40 +384,52 @@ namespace DMX2
this.toolbar4.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); this.toolbar4.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
this.toolbar4.IconSize = ((global::Gtk.IconSize)(2)); this.toolbar4.IconSize = ((global::Gtk.IconSize)(2));
this.hbox1.Add (this.toolbar4); this.hbox1.Add (this.toolbar4);
global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar4])); global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.toolbar4]));
w16.Position = 2; w77.Position = 2;
w16.Expand = false; w77.Expand = false;
w16.Fill = false; w77.Fill = false;
this.vbox2.Add (this.hbox1); this.vbox2.Add (this.hbox1);
global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1])); global::Gtk.Box.BoxChild w78 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.hbox1]));
w17.Position = 0; w78.Position = 0;
w17.Expand = false; w78.Expand = false;
w17.Fill = false; w78.Fill = false;
// Container child vbox2.Gtk.Box+BoxChild // Container child vbox2.Gtk.Box+BoxChild
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.nodeview1 = new global::Gtk.NodeView (); this.listFiles = new global::Gtk.NodeView ();
this.nodeview1.CanFocus = true; this.listFiles.CanFocus = true;
this.nodeview1.Name = "nodeview1"; this.listFiles.Name = "listFiles";
this.GtkScrolledWindow.Add (this.nodeview1); this.listFiles.RulesHint = true;
this.GtkScrolledWindow.Add (this.listFiles);
this.vbox2.Add (this.GtkScrolledWindow); this.vbox2.Add (this.GtkScrolledWindow);
global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow])); global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.GtkScrolledWindow]));
w19.Position = 1; w80.Position = 1;
this.GtkAlignment.Add (this.vbox2); this.GtkAlignment.Add (this.vbox2);
this.frame1.Add (this.GtkAlignment); this.frame1.Add (this.GtkAlignment);
this.GtkLabel3 = new global::Gtk.Label (); this.GtkLabel9 = new global::Gtk.Label ();
this.GtkLabel3.Name = "GtkLabel3"; this.GtkLabel9.Name = "GtkLabel9";
this.GtkLabel3.LabelProp = "Sequenceur Son"; this.GtkLabel9.LabelProp = "Sequenceur Son";
this.GtkLabel3.UseMarkup = true; this.GtkLabel9.UseMarkup = true;
this.frame1.LabelWidget = this.GtkLabel3; this.frame1.LabelWidget = this.GtkLabel9;
this.Add (this.frame1); this.Add (this.frame1);
if ((this.Child != null)) { if ((this.Child != null)) {
this.Child.ShowAll (); this.Child.ShowAll ();
} }
w1.SetUiManager (UIManager); w1.SetUiManager (UIManager);
this.Hide (); this.Hide ();
this.actAddFile.Activated += new global::System.EventHandler (this.OnActAddFileActivated);
this.actDelFile.Activated += new global::System.EventHandler (this.OnActDelFileActivated);
this.btnPlay.Clicked += new global::System.EventHandler (this.OnBtnPlayClicked);
this.btnPause.Clicked += new global::System.EventHandler (this.OnBtnPauseClicked);
this.btnStop.Clicked += new global::System.EventHandler (this.OnBtnStopClicked);
this.btnPrev.Clicked += new global::System.EventHandler (this.OnBtnPrevClicked);
this.btnRewind.Pressed += new global::System.EventHandler (this.OnBtnRewindPressed);
this.btnRewind.Released += new global::System.EventHandler (this.OnBtnRewindReleased);
this.btnForward.Pressed += new global::System.EventHandler (this.OnBtnForwardPressed);
this.btnForward.Released += new global::System.EventHandler (this.OnBtnForwardReleased);
this.btnNext.Clicked += new global::System.EventHandler (this.OnBtnNextClicked);
} }
} }
} }

View file

@ -3532,7 +3532,7 @@ trames DMX (ms)</property>
</widget> </widget>
</child> </child>
</widget> </widget>
<widget class="Gtk.Bin" id="DMX2.SeqSonUI" design-size="820 344"> <widget class="Gtk.Bin" id="DMX2.SeqSonUI" design-size="1045 610">
<action-group name="Default"> <action-group name="Default">
<action id="closeAction"> <action id="closeAction">
<property name="Type">Action</property> <property name="Type">Action</property>
@ -3574,15 +3574,17 @@ trames DMX (ms)</property>
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="StockId">gtk-media-next</property> <property name="StockId">gtk-media-next</property>
</action> </action>
<action id="addAction"> <action id="actAddFile">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="StockId">gtk-add</property> <property name="StockId">gtk-add</property>
<signal name="Activated" handler="OnActAddFileActivated" />
</action> </action>
<action id="removeAction"> <action id="actDelFile">
<property name="Type">Action</property> <property name="Type">Action</property>
<property name="Label" translatable="yes" /> <property name="Label" translatable="yes" />
<property name="StockId">gtk-remove</property> <property name="StockId">gtk-remove</property>
<signal name="Activated" handler="OnActDelFileActivated" />
</action> </action>
<action id="preferencesAction"> <action id="preferencesAction">
<property name="Type">Action</property> <property name="Type">Action</property>
@ -3698,46 +3700,128 @@ trames DMX (ms)</property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="Gtk.Toolbar" id="toolbar2"> <widget class="Gtk.HBox" id="hbox3">
<property name="MemberName" />
<property name="ShowArrow">False</property>
<property name="ButtonStyle">Icons</property>
<property name="IconSize">SmallToolbar</property>
<node name="__gtksharp_92_Stetic_Editor_ActionToolbar" type="Toolbar">
<node type="Toolitem" action="mediaPlayAction" />
<node type="Toolitem" action="mediaPauseAction" />
<node type="Toolitem" action="mediaStopAction" />
<node type="Toolitem" action="mediaPreviousAction" />
<node type="Toolitem" action="mediaRewindAction" />
<node type="Toolitem" action="mediaForwardAction" />
<node type="Toolitem" action="mediaNextAction" />
</node>
</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.HBox" id="hbox4">
<property name="MemberName" /> <property name="MemberName" />
<property name="Spacing">6</property> <property name="Spacing">6</property>
<child> <child>
<widget class="Gtk.Toolbar" id="toolbar3"> <widget class="Gtk.Button" id="btnPlay">
<property name="MemberName" /> <property name="MemberName" />
<property name="ShowArrow">False</property> <property name="CanFocus">True</property>
<property name="ButtonStyle">Icons</property> <property name="Type">TextAndIcon</property>
<property name="IconSize">SmallToolbar</property> <property name="Icon">stock:gtk-media-play Button</property>
<node name="__gtksharp_92_Stetic_Editor_ActionToolbar" type="Toolbar"> <property name="Label" translatable="yes" />
<node type="Toolitem" action="addAction" /> <property name="UseUnderline">True</property>
<node type="Toolitem" action="removeAction" /> <signal name="Clicked" handler="OnBtnPlayClicked" />
</node>
</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>
</child>
<child>
<widget class="Gtk.Button" id="btnPause">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-media-pause Button</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnBtnPauseClicked" />
</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="btnStop">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-media-stop Button</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnBtnStopClicked" />
</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.Button" id="btnPrev">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-media-previous Button</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnBtnPrevClicked" />
</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.Button" id="btnRewind">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-media-rewind Button</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<signal name="Pressed" handler="OnBtnRewindPressed" />
<signal name="Released" handler="OnBtnRewindReleased" />
</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.Button" id="btnForward">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-media-forward Button</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<signal name="Pressed" handler="OnBtnForwardPressed" />
<signal name="Released" handler="OnBtnForwardReleased" />
</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.Button" id="btnNext">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-media-next Button</property>
<property name="Label" translatable="yes" />
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnBtnNextClicked" />
</widget>
<packing>
<property name="Position">6</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -3748,7 +3832,7 @@ trames DMX (ms)</property>
<property name="InvisibleChar">•</property> <property name="InvisibleChar">•</property>
</widget> </widget>
<packing> <packing>
<property name="Position">1</property> <property name="Position">7</property>
<property name="AutoSize">True</property> <property name="AutoSize">True</property>
</packing> </packing>
</child> </child>
@ -3761,7 +3845,7 @@ trames DMX (ms)</property>
<property name="UseUnderline">True</property> <property name="UseUnderline">True</property>
</widget> </widget>
<packing> <packing>
<property name="Position">2</property> <property name="Position">8</property>
<property name="AutoSize">True</property> <property name="AutoSize">True</property>
<property name="Expand">False</property> <property name="Expand">False</property>
<property name="Fill">False</property> <property name="Fill">False</property>
@ -3769,7 +3853,7 @@ trames DMX (ms)</property>
</child> </child>
</widget> </widget>
<packing> <packing>
<property name="Position">3</property> <property name="Position">2</property>
<property name="AutoSize">True</property> <property name="AutoSize">True</property>
<property name="Expand">False</property> <property name="Expand">False</property>
<property name="Fill">False</property> <property name="Fill">False</property>
@ -3811,6 +3895,8 @@ trames DMX (ms)</property>
<property name="IconSize">SmallToolbar</property> <property name="IconSize">SmallToolbar</property>
<node name="__gtksharp_92_Stetic_Editor_ActionToolbar" type="Toolbar"> <node name="__gtksharp_92_Stetic_Editor_ActionToolbar" type="Toolbar">
<node type="Toolitem" action="closeAction1" /> <node type="Toolitem" action="closeAction1" />
<node type="Toolitem" action="actAddFile" />
<node type="Toolitem" action="actDelFile" />
</node> </node>
</widget> </widget>
<packing> <packing>
@ -3833,10 +3919,11 @@ trames DMX (ms)</property>
<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="listFiles">
<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>
<property name="RulesHint">True</property>
</widget> </widget>
</child> </child>
</widget> </widget>
@ -3850,7 +3937,7 @@ trames DMX (ms)</property>
</widget> </widget>
</child> </child>
<child> <child>
<widget class="Gtk.Label" id="GtkLabel3"> <widget class="Gtk.Label" id="GtkLabel9">
<property name="MemberName" /> <property name="MemberName" />
<property name="LabelProp" translatable="yes">Sequenceur Son</property> <property name="LabelProp" translatable="yes">Sequenceur Son</property>
<property name="UseMarkup">True</property> <property name="UseMarkup">True</property>