/// <summary> /// Set up the UI inside the Window /// </summary> private void InitializeWidgets(Manager simiasManager) { this.SetDefaultSize(480, 550); // Create an extra vbox to add the spacing EventBox prefsWindow = new EventBox(); prefsWindow.ModifyBg(StateType.Normal, this.Style.Background(StateType.Normal)); VBox winBox = new VBox(); //this.Add (winBox); prefsWindow.Add(winBox); this.Add(prefsWindow); winBox.BorderWidth = 7; winBox.Spacing = 7; this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png")); this.WindowPosition = Gtk.WindowPosition.Center; //----------------------------- // Set up the Notebook (tabs) //----------------------------- PrefNoteBook = new Notebook(); generalPage = new PrefsGeneralPage(this, ifws); PrefNoteBook.AppendPage(generalPage, new Label(Util.GS("General"))); accountsPage = new PrefsAccountsPage(this); PrefNoteBook.AppendPage(accountsPage, new Label(Util.GS("Accounts"))); /*migrationPage =*/ new MigrationPage(this, ifws); // PrefNoteBook.AppendPage( migrationPage, new Label(Util.GS("Migration"))); PrefNoteBook.SwitchPage += new SwitchPageHandler(OnSwitchPageEvent); winBox.PackStart(PrefNoteBook, true, true, 0); HButtonBox buttonBox = new HButtonBox(); buttonBox.BorderWidth = 10; buttonBox.Spacing = 10; buttonBox.Layout = ButtonBoxStyle.Edge; winBox.PackStart(buttonBox, false, false, 0); Button helpButton = new Button(Gtk.Stock.Help); buttonBox.PackStart(helpButton); helpButton.Clicked += new EventHandler(HelpEventHandler); Button closeButton = new Button(Gtk.Stock.Close); buttonBox.PackStart(closeButton); closeButton.Clicked += new EventHandler(CloseEventHandler); }
private void InitializeWidgets(Manager simiasManager) { this.SetDefaultSize (480, 550); VBox winBox = new VBox(); this.Add (winBox); winBox.BorderWidth = 7; winBox.Spacing = 7; this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder24.png")); this.WindowPosition = Gtk.WindowPosition.Center; PrefNoteBook = new Notebook(); generalPage = new PrefsGeneralPage(this, ifws); PrefNoteBook.AppendPage( generalPage, new Label(Util.GS("General"))); accountsPage = new PrefsAccountsPage(this); PrefNoteBook.AppendPage( accountsPage, new Label(Util.GS("Accounts"))); PrefNoteBook.SwitchPage += new SwitchPageHandler(OnSwitchPageEvent); winBox.PackStart(PrefNoteBook, true, true, 0); HButtonBox buttonBox = new HButtonBox(); buttonBox.BorderWidth = 10; buttonBox.Spacing = 10; buttonBox.Layout = ButtonBoxStyle.Edge; winBox.PackStart(buttonBox, false, false, 0); Button helpButton = new Button(Gtk.Stock.Help); buttonBox.PackStart(helpButton); helpButton.Clicked += new EventHandler(HelpEventHandler); Button closeButton = new Button(Gtk.Stock.Close); buttonBox.PackStart(closeButton); closeButton.Clicked += new EventHandler(CloseEventHandler); }