Exemplo n.º 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public UpgradeForm(IMainView explorerPresenter)
        {
            Builder builder = ViewBase.BuilderFromResource("ApsimNG.Resources.Glade.UpgradeForm.glade");

            window1         = (Window)builder.GetObject("window1");
            button1         = (Button)builder.GetObject("button1");
            button2         = (Button)builder.GetObject("button2");
            table1          = (Table)builder.GetObject("table1");
            table2          = (Table)builder.GetObject("table2");
            firstNameBox    = (Entry)builder.GetObject("firstNameBox");
            lastNameBox     = (Entry)builder.GetObject("lastNameBox");
            organisationBox = (Entry)builder.GetObject("organisationBox");
            emailBox        = (Entry)builder.GetObject("emailBox");
            address1Box     = (Entry)builder.GetObject("address1Box");
            address2Box     = (Entry)builder.GetObject("address2Box");
            cityBox         = (Entry)builder.GetObject("cityBox");
            stateBox        = (Entry)builder.GetObject("stateBox");
            countryBox      = (Entry)builder.GetObject("countryBox");
            postcodeBox     = (Entry)builder.GetObject("postcodeBox");
            label1          = (Label)builder.GetObject("label1");
            HTMLalign       = (Alignment)builder.GetObject("HTMLalign");
            checkbutton1    = (CheckButton)builder.GetObject("checkbutton1");
            listview1       = (TreeView)builder.GetObject("listview1");
            alignment3      = (Alignment)builder.GetObject("alignment3");
            alignment4      = (Alignment)builder.GetObject("alignment4");
            alignment5      = (Alignment)builder.GetObject("alignment5");
            alignment6      = (Alignment)builder.GetObject("alignment6");
            alignment7      = (Alignment)builder.GetObject("alignment7");

            listview1.Model = listmodel;

            CellRendererText textRender = new Gtk.CellRendererText();

            textRender.Editable = false;

            TreeViewColumn column0 = new TreeViewColumn("Version", textRender, "text", 0);

            listview1.AppendColumn(column0);
            column0.Sizing    = TreeViewColumnSizing.Autosize;
            column0.Resizable = true;

            TreeViewColumn column1 = new TreeViewColumn("Description", textRender, "text", 1);

            listview1.AppendColumn(column1);
            column1.Sizing    = TreeViewColumnSizing.Autosize;
            column1.Resizable = true;

            // Make the tab order a little more sensible than the defaults
            table1.FocusChain = new Widget[] { alignment7, button1, button2 };
            table2.FocusChain = new Widget[] { firstNameBox, lastNameBox, organisationBox, emailBox,
                                               alignment3, alignment4, cityBox, alignment5, countryBox, alignment6 };

            HTMLview = new HTMLView(new ViewBase(null));
            HTMLalign.Add(HTMLview.MainWidget);
            this.tabbedExplorerView = explorerPresenter;
            button1.Clicked        += OnUpgrade;
            button2.Clicked        += OnViewMoreDetail;
            window1.Destroyed      += OnFormClosing;
            window1.MapEvent       += OnShown;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        public UpgradeForm(IMainView explorerPresenter)
        {
            Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.UpgradeForm.glade", "window1");
            gxml.Autoconnect(this);
            listview1.Model = listmodel;

            CellRendererText textRender = new Gtk.CellRendererText();

            textRender.Editable = false;

            TreeViewColumn column0 = new TreeViewColumn("Version", textRender, "text", 0);

            listview1.AppendColumn(column0);
            column0.Sizing    = TreeViewColumnSizing.Autosize;
            column0.Resizable = true;

            TreeViewColumn column1 = new TreeViewColumn("Description", textRender, "text", 1);

            listview1.AppendColumn(column1);
            column1.Sizing    = TreeViewColumnSizing.Autosize;
            column1.Resizable = true;

            // Make the tab order a little more sensible than the defaults
            table1.FocusChain = new Widget[] { alignment7, button1, button2 };
            table2.FocusChain = new Widget[] { firstNameBox, lastNameBox, organisationBox, emailBox,
                                               alignment3, alignment4, cityBox, alignment5, countryBox, alignment6 };

            HTMLview = new HTMLView(new ViewBase(null));
            HTMLalign.Add(HTMLview.MainWidget);
            this.tabbedExplorerView = explorerPresenter;
            button1.Clicked        += OnUpgrade;
            button2.Clicked        += OnViewMoreDetail;
            window1.Destroyed      += OnFormClosing;
            window1.MapEvent       += OnShown;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Constructor
        /// </summary>
        public UpgradeForm(IMainView explorerPresenter)
        {
            Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.UpgradeForm.glade", "window1");
            gxml.Autoconnect(this);
            listview1.Model = listmodel;

            CellRendererText textRender = new Gtk.CellRendererText();
            textRender.Editable = false;

            TreeViewColumn column0 = new TreeViewColumn("Version", textRender, "text", 0);
            listview1.AppendColumn(column0);
            column0.Sizing = TreeViewColumnSizing.Autosize;
            column0.Resizable = true;

            TreeViewColumn column1 = new TreeViewColumn("Description", textRender, "text", 1);
            listview1.AppendColumn(column1);
            column1.Sizing = TreeViewColumnSizing.Autosize;
            column1.Resizable = true;

            HTMLview = new HTMLView(new ViewBase(null));
            HTMLalign.Add(HTMLview.MainWidget);
            this.tabbedExplorerView = explorerPresenter;
            button1.Clicked += OnUpgrade;
            button2.Clicked += OnViewMoreDetail;
            window1.Destroyed += OnFormClosing;
            window1.MapEvent += OnShown;
        }