SessionLoadWindow.SessionLoadWindow C# (CSharp) Method

SessionLoadWindow() static private method

static private SessionLoadWindow ( Gtk parent, WindowType, type ) : System
parent Gtk
type WindowType,
return System
    SessionLoadWindow(Gtk.Window parent, WindowType type)
    {
        this.type = type;
        Glade.XML gladeXML;
        gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "session_load.glade", "session_load", null);
        gladeXML.Autoconnect(this);
        session_load.Parent = parent;

        // Hides and shows widgets only needed by some of the functionality
        session_import_box.Visible = (type == WindowType.IMPORT_SESSION);
        checkbutton_show_data_encoder.Visible = (type == WindowType.LOAD_SESSION);
        checkbutton_show_data_jump_run.Visible = (type == WindowType.LOAD_SESSION);

        if (type == WindowType.LOAD_SESSION) {
            session_load.Title = Catalog.GetString ("Load session");
        } else {
            session_load.Title = Catalog.GetString ("Import session");
        }

        //put an icon to window
        UtilGtk.IconWindow(session_load);

        createTreeView(treeview_session_load, false, false);
        store = getStore(false, false);
        treeview_session_load.Model = store;
        fillTreeView(treeview_session_load, store, false, false);

        button_accept.Sensitive = false;
        entry_search_filter.CanFocus = true;
        entry_search_filter.IsFocus = true;

        // Leave the state of the Importing Comboboxes as they are by default
        /*radio_import_new_session.Active = true;
        radio_import_current_session.Sensitive = false;
        */

        treeview_session_load.Selection.Changed += onSelectionEntry;

        /**
        * Uncomment if we want the session file chooser to be loaded with the dialog.
        * On Linux at least the placement of the Windows can be strange so at the moment
        * I leave it disabled until we discuss (to enable or to delete it).
        if (type == WindowType.IMPORT_SESSION) {
            chooseDatabaseToImport ();
        }
        */
    }