How to Embed media file in monodevlop Application
hello!!!
im using ubunti 11.10 to create c# application wid the help of monodevelop
im trying to embed media file in my monodevelop app bt i cant achieve it.
i hav written a code to embed mplayer in monodevlop bt it open mplayer exe seperately .i want it to embed in monodevelop widget.so please go through my code:
-----code-----
using System;
using Gtk;
using System.Runtime.InteropServices;
public partial class MainWindow : Gtk.Window
{
private Gtk.Socket socket;
private int xid;
public MainWindow () : base(Gtk.WindowType.Toplevel)
{
Build ();
this.socket = new Socket();
this.socket.WidthRequest = 320;
this.socket.HeightRequest = 240;
this.socket.Visible = true;
this.socket.Realized += new EventHandler(OnVideoWidgetRealized);
this.fixed2.Put(socket, 0, 0);
}
protected virtual void OnVideoWidgetRealized (object sender, EventArgs args)
{
this.xid = (int)socket.Id;
}
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
this.socket = new Socket();
}
protected virtual void OnButton17Clicked (object sender, System.EventArgs e)
{
var paramString = string.Format("-wid {0} -vo x11 -really-quiet -msglevel all=-1 gooddog.wmv", xid);
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "/usr/bin/mplayer";
proc.StartInfo.Arguments = paramString;
proc.Start();
proc.WaitForExit();
}
}
|