public GladyWindow(WindowType windowType, string filename)
 {
     if (useGlade)
     {
         using (var file = App.GetEmbeddedResourceStream("glade." + filename + ".glade"))
         {
             Glade.XML gxml = new Glade.XML(file, gladeElementId, "");
             gxml.Autoconnect(this);
         }
     }
     else
     {
         using (var file = App.GetEmbeddedResourceStream("glade." + filename + ".gtk.xml"))
         {
             var builder = new Gtk.Builder();
             using (var reader = new StreamReader(file))
             {
                 builder.AddFromString(reader.ReadToEnd());
                 _window = builder.GetObject(gladeElementId) as Gtk.Window;
             }
         }
     }
     Window.Icon = Gdk.Pixbuf.LoadFromResource(App.GetEmbeddedResourceName("resources.app.png"));
 }