loupiottes/DMX-2.0/Main.cs
2013-11-05 08:42:23 +00:00

34 lines
No EOL
806 B
C#

using System;
using Gtk;
namespace DMX2
{
class MainClass
{
public static void Main (string[] args)
{
Application.Init ();
System.IO.Directory.SetCurrentDirectory (
(new System.IO.FileInfo(
System.Reflection.Assembly.GetExecutingAssembly().Location
)).DirectoryName
);
if(System.IO.File.Exists("style.gtkrc")) Gtk.Rc.Parse("style.gtkrc");
else
using (System.IO.Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("style.gtkrc"))
using (System.IO.TextReader reader = new System.IO.StreamReader(stream))
Gtk.Rc.ParseString (reader.ReadToEnd());
MainWindow win = new MainWindow ();
win.Show ();
Application.Run ();
if (Conduite.Courante != null) {
Conduite.Courante.Dispose();
}
}
}
}