Ejemplo n.º 1
0
        public ExceptionCaughtDialog(ExceptionInfo val, ExceptionCaughtMessage msg)
        {
            Title    = GettextCatalog.GetString("Exception Caught");
            ex       = val;
            widget   = new ExceptionCaughtWidget(val);
            this.msg = msg;

            VBox box = new VBox();

            box.Spacing = 6;
            box.PackStart(widget, true, true, 0);
            HButtonBox buttonBox = new HButtonBox();

            buttonBox.BorderWidth = 6;

            var copy = new Gtk.Button(GettextCatalog.GetString("Copy to Clipboard"));

            buttonBox.PackStart(copy, false, false, 0);
            copy.Clicked += HandleCopyClicked;

            var close = new Gtk.Button(GettextCatalog.GetString("Close"));

            buttonBox.PackStart(close, false, false, 0);
            close.Clicked   += (sender, e) => msg.Close();
            close.Activated += (sender, e) => msg.Close();

            box.PackStart(buttonBox, false, false, 0);
            VBox.Add(box);

            DefaultWidth  = 500;
            DefaultHeight = 350;

            box.ShowAll();
            ActionArea.Hide();
        }
Ejemplo n.º 2
0
        Widget CreateButtonBox()
        {
            var buttons = new HButtonBox {
                Layout = ButtonBoxStyle.End, Spacing = 18
            };

            var copy = new Button(Stock.Copy);

            copy.Clicked += CopyClicked;
            copy.Show();

            buttons.PackStart(copy, false, true, 0);

            var close = new Button(Stock.Close);

            close.Activated += CloseClicked;
            close.Clicked   += CloseClicked;
            close.Show();

            buttons.PackStart(close, false, true, 0);

            buttons.Show();

            return(buttons);
        }
Ejemplo n.º 3
0
        /// <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);
        }
            public DialogWidget(params object[]data)
                : base()
            {
                box = new VBox ();
                actionArea = new HButtonBox ();
                actionArea.LayoutStyle = ButtonBoxStyle.End;
                buttons = new Button[data.Length / 2];
                response_ids = new int[data.Length / 2];

                for (int i = 0; i < data.Length; i += 2)
                  {
                      Button button =
                          new Button (data[i] as
                                  string);
                        button.Clicked += OnClicked;
                        actionArea.PackStart (button,
                                  false,
                                  false, 4);
                        buttons[i / 2] = button;
                        response_ids[i / 2] =
                          (int) data[i + 1];
                  }

                PackStart (box, true, true, 4);
                  PackStart (actionArea, false, true, 4);
                  ShowAll ();
            }
Ejemplo n.º 5
0
        public NewSearchPage() : base(0.5f, 0.5f, 0f, 0f)
        {
            base.SetPadding(36, 36, 36, 36);
            base.FocusGrabbed += base_FocusGrabbed;

            mainVBox = new VBox();

            Label label = new Label();

            label.Xalign = 0;
            label.Markup = "<span size=\"x-large\" weight=\"bold\">Search for files...</span>";
            mainVBox.PackStart(label, false, false, 0);
            label.Show();

            searchEntry = new FileSearchEntry();
            searchEntry.WidthRequest = 400;
            mainVBox.PackStart(searchEntry, false, false, 6);
            searchEntry.Show();

            searchButton          = new Button("_Search");
            searchButton.Image    = new Image(Stock.Find, IconSize.Button);
            searchButton.Clicked += searchButton_Clicked;
            searchButton.Show();

            HButtonBox buttonBox = new HButtonBox();

            buttonBox.Layout = ButtonBoxStyle.End;
            buttonBox.PackStart(searchButton, false, false, 0);
            mainVBox.PackStart(buttonBox, false, false, 0);
            buttonBox.Show();

            base.Add(mainVBox);
            mainVBox.Show();
        }
Ejemplo n.º 6
0
            public PlayerPage(ICSGameObserverWidget widget,
					   MoveDetails details)
                : base(widget,
								      details)
            {
                HButtonBox box = new HButtonBox ();

                  drawButton =
                    new Button (Catalog.
                            GetString ("Draw"));
                  resignButton =
                    new Button (Catalog.
                            GetString ("Resign"));
                  abortButton =
                    new Button (Catalog.
                            GetString ("Abort"));
                  adjournButton =
                    new Button (Catalog.
                            GetString ("Adjourn"));
                  takebackButton =
                    new Button (Catalog.
                            GetString ("Takeback"));

                  drawButton.Clicked += OnClicked;
                  resignButton.Clicked += OnClicked;
                  abortButton.Clicked += OnClicked;
                  adjournButton.Clicked += OnClicked;
                  takebackButton.Clicked += OnClicked;

                  box.LayoutStyle = ButtonBoxStyle.Start;
                  box.PackStart (drawButton, false, false, 2);
                  box.PackStart (resignButton, false, false,
                         2);
                  box.PackStart (abortButton, false, false,
                         2);
                  box.PackStart (adjournButton, false, false,
                         2);
                  box.PackStart (takebackButton, false, false,
                         2);
                  box.ShowAll ();
                  PackStart (box, false, true, 2);
            }
Ejemplo n.º 7
0
        /// <summary>Add a button to the button bar</summary>
        /// <param name="text">Text for button</param>
        /// <param name="image">Image for button</param>
        /// <param name="handler">Handler to call when user clicks on button</param>
        public void AddButton(string text, Image image, EventHandler handler)
        {
            Button button = new Button(text);

            button.Image       = image;
            button.Clicked    += handler;
            button.BorderWidth = 5;
            if (image != null)
            {
                button.ImagePosition = PositionType.Top;
            }

            buttonPanel.PackStart(button, false, false, 0);
            buttonPanel.ShowAll();
        }
Ejemplo n.º 8
0
        private Widget CreateBottomBar()
        {
            HButtonBox buttonBox = new HButtonBox();

            buttonBox.Layout = ButtonBoxStyle.Edge;

            toggleSidebarButton          = new Button();
            toggleSidebarButton.Label    = Catalog.GetString("Close Sidebar");
            toggleSidebarButton.Relief   = ReliefStyle.None;
            toggleSidebarButton.Clicked += OnToggleSidebarButtonClicked;
            toggleSidebarButton.Show();
            buttonBox.PackStart(toggleSidebarButton, false, false, 0);

            personHScale               = new HScale(1, 3, 1);
            personHScale.DrawValue     = false;
            personHScale.ValueChanged += OnPersonHScaledValueChanged;
            personHScale.Show();
            buttonBox.PackEnd(personHScale, false, false, 0);

            buttonBox.Show();
            return(buttonBox);
        }
Ejemplo n.º 9
0
        private void InitComponents()
        {
            Resizable      = true;
            HeightRequest  = 425;
            WidthRequest   = 410;
            WindowPosition = WindowPosition.Center;
            Icon           = IconThemeUtils.LoadIcon("banshee", 16);

            var vbox = new VBox()
            {
                Spacing     = 6,
                BorderWidth = 12
            };

            track_info_display = new ClassicTrackInfoDisplay();
            vbox.PackStart(track_info_display, false, false, 0);

            lyrics_browser = new LyricsBrowser();

            lyrics_pane = new ScrolledWindow();
            lyrics_pane.Add(lyrics_browser);

            var frame = new Frame();

            frame.Add(lyrics_pane);

            vbox.PackStart(frame, true, true, 0);

            var button_box = new HButtonBox()
            {
                Spacing     = 6,
                BorderWidth = 1,
                LayoutStyle = ButtonBoxStyle.End
            };

            var copy_button = new Button("gtk-copy")
            {
                TooltipText = AddinManager.CurrentLocalizer.GetString("Copy lyrics to clipboard")
            };
            var close_button = new Button("gtk-close");

            refresh_button = new Button("gtk-refresh");
            save_button    = new Button("gtk-save");

            button_box.PackStart(copy_button, false, false, 0);
            button_box.PackStart(refresh_button, false, false, 0);
            button_box.PackStart(save_button, false, false, 0);
            button_box.PackStart(close_button, false, false, 0);

            vbox.PackStart(button_box, false, false, 0);

            Add(vbox);
            if (Child != null)
            {
                Child.ShowAll();
            }

            text_view          = new TextView();
            text_view.WrapMode = WrapMode.Word;

            Hide();

            KeyPressEvent += OnKeyPressed;
            DeleteEvent   += delegate(object o, DeleteEventArgs args) {
                OnClose(this, null);
                args.RetVal = true;
            };

            refresh_button.Clicked += OnRefresh;
            save_button.Clicked    += OnSaveLyrics;
            close_button.Clicked   += OnClose;
            copy_button.Clicked    += OnCopy;

            lyrics_browser.AddLinkClicked       += ManuallyAddLyrics;
            LyricsManager.Instance.LoadStarted  += lyrics_browser.OnLoading;
            LyricsManager.Instance.LoadFinished += lyrics_browser.LoadString;
            SwitchTo(HTML_MODE);
        }
Ejemplo n.º 10
0
        public TangoList(Window parent) : base("単語の登録")
        {
            SetSizeRequest(800, 600);
            TransientFor = parent;
            SetPosition(WindowPosition.CenterOnParent);

            KeyReleaseEvent += OnKeyReleaseEvent;

            var hbox = new HBox {
                BorderWidth = 5
            };

            hbox.PackStart(new Label("フィルタ"), false, true, 5);
            hbox.PackStart(_filterEntry, false, false, 0);
            hbox.PackStart(_cleanButton, false, true, 5);
            _filterEntry.Changed += FilterEntryOnChanged;
            _cleanButton.Clicked += CleanButtonOnClicked;
            hbox.PackStart(new VSeparator(), false, false, 5);

            var hbbox = new HButtonBox {
                Layout = ButtonBoxStyle.Start, Spacing = 5
            };

            hbbox.PackStart(_addTangoButton);
            hbbox.PackStart(_editTangoButton);
            hbbox.PackStart(_deleteTangoButton);
            _addTangoButton.Clicked    += AddTangoButtonOnClicked;
            _editTangoButton.Clicked   += EditTangoButtonOnClicked;
            _deleteTangoButton.Clicked += DeleteTangoButtonOnClicked;
            _deleteTangoButton.SetButtonColor(255, 150, 150);
            hbox.PackStart(hbbox, false, false, 0);
            _mainVerticalBox.PackStart(hbox, false, true, 5);

            _tangoView.Events            = EventMask.ButtonPressMask;
            _tangoView.ButtonPressEvent += TangoViewOnButtonPressEvent;
            _tangoView.AppendColumn("ID", new CellRendererText(), "text", 0);
            _tangoView.AppendColumn("単語", new CellRendererText {
                Scale = 1.5
            }, "text", 1);
            _tangoView.AppendColumn("ふりがな", new CellRendererText(), "text", 2);
            _tangoView.AppendColumn("ローマ字", new CellRendererText(), "text", 3);
            _tangoView.AppendColumn("翻訳", new CellRendererText(), "text", 4);
            _tangoView.AppendColumn("見た", new CellRendererText(), "text", 5);
            _tangoView.AppendColumn("正解", new CellRendererText(), "text", 6);
            _tangoView.AppendColumn("間違", new CellRendererText(), "text", 7);
            _tangoView.AppendColumn("正解率", new CellRendererText(), "text", 8);

            var i = 0;

            foreach (var tangoViewColumn in _tangoView.Columns)
            {
                tangoViewColumn.SortColumnId = i++;
                tangoViewColumn.Clickable    = true;
            }

            RefreshList();

            _tangoScroll.Add(_tangoView);
            _mainVerticalBox.PackStart(_tangoScroll);
            Add(_mainVerticalBox);

            ShowAll();
        }
Ejemplo n.º 11
0
        void Build()
        {
            BorderWidth   = 0;
            DefaultWidth  = 901;
            DefaultHeight = 632;

            Name           = "wizard_dialog";
            Title          = GettextCatalog.GetString("New Project");
            WindowPosition = WindowPosition.CenterOnParent;
            TransientFor   = IdeApp.Workbench.RootWindow;

            projectConfigurationWidget      = new GtkProjectConfigurationWidget();
            projectConfigurationWidget.Name = "projectConfigurationWidget";

            // Top banner of dialog.
            var topLabelEventBox = new EventBox();

            topLabelEventBox.Accessible.SetShouldIgnore(true);
            topLabelEventBox.Name          = "topLabelEventBox";
            topLabelEventBox.HeightRequest = 52;
            topLabelEventBox.ModifyBg(StateType.Normal, bannerBackgroundColor);
            topLabelEventBox.ModifyFg(StateType.Normal, whiteColor);
            topLabelEventBox.BorderWidth = 0;

            var topBannerBottomEdgeLineEventBox = new EventBox();

            topBannerBottomEdgeLineEventBox.Accessible.SetShouldIgnore(true);
            topBannerBottomEdgeLineEventBox.Name          = "topBannerBottomEdgeLineEventBox";
            topBannerBottomEdgeLineEventBox.HeightRequest = 1;
            topBannerBottomEdgeLineEventBox.ModifyBg(StateType.Normal, bannerLineColor);
            topBannerBottomEdgeLineEventBox.BorderWidth = 0;

            topBannerLabel                 = new Label();
            topBannerLabel.Name            = "topBannerLabel";
            topBannerLabel.Accessible.Name = "topBannerLabel";
            Pango.FontDescription font = topBannerLabel.Style.FontDescription.Copy();              // UNDONE: VV: Use FontService?
            font.Size   = (int)(font.Size * 2.0);
            font.Weight = Pango.Weight.Bold;
            topBannerLabel.ModifyFont(font);
            topBannerLabel.ModifyFg(StateType.Normal, whiteColor);
            var topLabelHBox = new HBox();

            topLabelHBox.Accessible.SetShouldIgnore(true);
            topLabelHBox.Name = "topLabelHBox";
            topLabelHBox.PackStart(topBannerLabel, false, false, 20);
            topLabelEventBox.Add(topLabelHBox);

            VBox.PackStart(topLabelEventBox, false, false, 0);
            VBox.PackStart(topBannerBottomEdgeLineEventBox, false, false, 0);

            // Main templates section.
            centreVBox = new VBox();
            centreVBox.Accessible.SetShouldIgnore(true);
            centreVBox.Name = "centreVBox";
            VBox.PackStart(centreVBox, true, true, 0);
            templatesHBox = new HBox();
            templatesHBox.Accessible.SetShouldIgnore(true);
            templatesHBox.Name = "templatesHBox";
            centreVBox.PackEnd(templatesHBox, true, true, 0);

            // Template categories.
            var templateCategoriesBgBox = new EventBox();

            templateCategoriesBgBox.Accessible.SetShouldIgnore(true);
            templateCategoriesBgBox.Name        = "templateCategoriesVBox";
            templateCategoriesBgBox.BorderWidth = 0;
            templateCategoriesBgBox.ModifyBg(StateType.Normal, categoriesBackgroundColor);
            templateCategoriesBgBox.WidthRequest = 220;
            var templateCategoriesScrolledWindow = new ScrolledWindow();

            templateCategoriesScrolledWindow.Name             = "templateCategoriesScrolledWindow";
            templateCategoriesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Template categories tree view.
            templateCategoriesTreeView                 = new TreeView();
            templateCategoriesTreeView.Name            = "templateCategoriesTreeView";
            templateCategoriesTreeView.Accessible.Name = "templateCategoriesTreeView";
            templateCategoriesTreeView.Accessible.SetTitle(GettextCatalog.GetString("Project Categories"));
            templateCategoriesTreeView.Accessible.Description = GettextCatalog.GetString("Select the project category to see all possible project templates");
            templateCategoriesTreeView.BorderWidth            = 0;
            templateCategoriesTreeView.HeadersVisible         = false;
            templateCategoriesTreeView.Model         = templateCategoriesListStore;
            templateCategoriesTreeView.SearchColumn  = -1;            // disable the interactive search
            templateCategoriesTreeView.ShowExpanders = false;

            templateCategoriesTreeView.AppendColumn(CreateTemplateCategoriesTreeViewColumn());
            templateCategoriesScrolledWindow.Add(templateCategoriesTreeView);
            templateCategoriesBgBox.Add(templateCategoriesScrolledWindow);
            templatesHBox.PackStart(templateCategoriesBgBox, false, false, 0);

            // Templates.
            var templatesBgBox = new EventBox();

            templatesBgBox.Accessible.SetShouldIgnore(true);
            templatesBgBox.ModifyBg(StateType.Normal, templateListBackgroundColor);
            templatesBgBox.Name         = "templatesVBox";
            templatesBgBox.WidthRequest = 400;
            templatesHBox.PackStart(templatesBgBox, false, false, 0);
            var templatesScrolledWindow = new ScrolledWindow();

            templatesScrolledWindow.Name             = "templatesScrolledWindow";
            templatesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Templates tree view.
            templatesTreeView                 = new TreeView();
            templatesTreeView.Name            = "templatesTreeView";
            templatesTreeView.Accessible.Name = "templatesTreeView";
            templatesTreeView.Accessible.SetTitle(GettextCatalog.GetString("Project Templates"));
            templatesTreeView.Accessible.Description = GettextCatalog.GetString("Select the project template");
            templatesTreeView.HeadersVisible         = false;
            templatesTreeView.Model         = templatesTreeStore;
            templatesTreeView.SearchColumn  = -1;            // disable the interactive search
            templatesTreeView.ShowExpanders = false;
            templatesTreeView.AppendColumn(CreateTemplateListTreeViewColumn());
            templatesScrolledWindow.Add(templatesTreeView);
            templatesBgBox.Add(templatesScrolledWindow);

            // Accessibilityy
            templateCategoriesTreeView.Accessible.AddLinkedUIElement(templatesTreeView.Accessible);

            // Template
            var templateEventBox = new EventBox();

            templateEventBox.Accessible.SetShouldIgnore(true);
            templateEventBox.Name = "templateEventBox";
            templateEventBox.ModifyBg(StateType.Normal, templateBackgroundColor);
            templatesHBox.PackStart(templateEventBox, true, true, 0);
            templateVBox = new VBox();
            templateVBox.Accessible.SetShouldIgnore(true);
            templateVBox.Visible     = false;
            templateVBox.BorderWidth = 20;
            templateVBox.Spacing     = 10;
            templateEventBox.Add(templateVBox);

            // Template large image.
            templateImage = new ImageView();
            templateImage.Accessible.SetShouldIgnore(true);
            templateImage.Name          = "templateImage";
            templateImage.HeightRequest = 140;
            templateImage.WidthRequest  = 240;
            templateVBox.PackStart(templateImage, false, false, 10);

            // Template description.
            templateNameLabel                        = new Label();
            templateNameLabel.Name                   = "templateNameLabel";
            templateNameLabel.Accessible.Name        = "templateNameLabel";
            templateNameLabel.Accessible.Description = GettextCatalog.GetString("The name of the selected template");
            templateNameLabel.WidthRequest           = 240;
            templateNameLabel.Wrap                   = true;
            templateNameLabel.Xalign                 = 0;
            templateNameLabel.Markup                 = MarkupTemplateName("TemplateName");
            templateVBox.PackStart(templateNameLabel, false, false, 0);
            templateDescriptionLabel                 = new Label();
            templateDescriptionLabel.Name            = "templateDescriptionLabel";
            templateDescriptionLabel.Accessible.Name = "templateDescriptionLabel";
            templateDescriptionLabel.Accessible.SetLabel(GettextCatalog.GetString("The description of the selected template"));
            templateDescriptionLabel.WidthRequest = 240;
            templateDescriptionLabel.Wrap         = true;
            templateDescriptionLabel.Xalign       = 0;
            templateVBox.PackStart(templateDescriptionLabel, false, false, 0);

            var tempLabel = new Label();

            tempLabel.Accessible.SetShouldIgnore(true);
            templateVBox.PackStart(tempLabel, true, true, 0);

            templatesTreeView.Accessible.AddLinkedUIElement(templateNameLabel.Accessible);
            templatesTreeView.Accessible.AddLinkedUIElement(templateDescriptionLabel.Accessible);

            // Template - button separator.
            var templateSectionSeparatorEventBox = new EventBox();

            templateSectionSeparatorEventBox.Accessible.SetShouldIgnore(true);
            templateSectionSeparatorEventBox.Name          = "templateSectionSeparatorEventBox";
            templateSectionSeparatorEventBox.HeightRequest = 1;
            templateSectionSeparatorEventBox.ModifyBg(StateType.Normal, templateSectionSeparatorColor);
            VBox.PackStart(templateSectionSeparatorEventBox, false, false, 0);

            // Buttons at bottom of dialog.
            var bottomHBox = new HBox();

            bottomHBox.Accessible.SetShouldIgnore(true);
            bottomHBox.Name = "bottomHBox";
            VBox.PackStart(bottomHBox, false, false, 0);

            // Cancel button - bottom left.
            var cancelButtonBox = new HButtonBox();

            cancelButtonBox.Accessible.SetShouldIgnore(true);
            cancelButtonBox.Name        = "cancelButtonBox";
            cancelButtonBox.BorderWidth = 16;
            cancelButton                        = new Button();
            cancelButton.Name                   = "cancelButton";
            cancelButton.Accessible.Name        = "cancelButton";
            cancelButton.Accessible.Description = GettextCatalog.GetString("Cancel the dialog");
            cancelButton.Label                  = GettextCatalog.GetString("Cancel");
            cancelButton.UseStock               = true;
            cancelButtonBox.PackStart(cancelButton, false, false, 0);
            bottomHBox.PackStart(cancelButtonBox, false, false, 0);

            // Previous button - bottom right.
            var previousNextButtonBox = new HButtonBox();

            previousNextButtonBox.Accessible.SetShouldIgnore(true);
            previousNextButtonBox.Name        = "previousNextButtonBox";
            previousNextButtonBox.BorderWidth = 16;
            previousNextButtonBox.Spacing     = 9;
            bottomHBox.PackStart(previousNextButtonBox);
            previousNextButtonBox.Layout = ButtonBoxStyle.End;

            previousButton                        = new Button();
            previousButton.Name                   = "previousButton";
            previousButton.Accessible.Name        = "previousButton";
            previousButton.Accessible.Description = GettextCatalog.GetString("Return to the previous page");
            previousButton.Label                  = GettextCatalog.GetString("Previous");
            previousButton.Sensitive              = false;
            previousNextButtonBox.PackEnd(previousButton);

            // Next button - bottom right.
            nextButton                        = new Button();
            nextButton.Name                   = "nextButton";
            nextButton.Accessible.Name        = "nextButton";
            nextButton.Accessible.Description = GettextCatalog.GetString("Move to the next page");
            nextButton.Label                  = GettextCatalog.GetString("Next");
            previousNextButtonBox.PackEnd(nextButton);

            // Remove default button action area.
            VBox.Remove(ActionArea);

            if (Child != null)
            {
                Child.ShowAll();
            }

            Show();

            templatesTreeView.HasFocus = true;
            Resizable = false;
        }
Ejemplo n.º 12
0
        public TangoEditor(Window parent) : base("単語の編集")
        {
            _parentWindow = parent;
            WidthRequest  = 400;
            Modal         = true;
            TransientFor  = _parentWindow;
            Resizable     = true;
            SetPosition(WindowPosition.CenterOnParent);

            var table = new Table(4, 2, false)
            {
                ColumnSpacing = 5,
                RowSpacing    = 5
            };

            table.Attach(new Label("ID")
            {
                WidthRequest = 50, Xalign = 1
            }, 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            table.Attach(new Label("単語")
            {
                WidthRequest = 50, Xalign = 1
            }, 0, 1, 1, 2, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            table.Attach(new Label("ふりがな")
            {
                WidthRequest = 50, Xalign = 1
            }, 0, 1, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            table.Attach(new Label("ローマ字")
            {
                WidthRequest = 50, Xalign = 1
            }, 0, 1, 3, 4, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            table.Attach(new Label("翻訳")
            {
                WidthRequest = 50, Xalign = 1
            }, 0, 1, 4, 5, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);

            var hbox = new HBox();

            hbox.PackStart(_idEntry, false, false, 0);
            table.Attach(hbox, 1, 2, 0, 1, AttachOptions.Fill, AttachOptions.Fill, 0, 0);
            table.Attach(_tangoEntry, 1, 2, 1, 2);
            table.Attach(_furiganaEntry, 1, 2, 2, 3);
            table.Attach(_romajiEntry, 1, 2, 3, 4);
            table.Attach(_honyakuEntry, 1, 2, 4, 5);

            _tangoEntry.Changed    += EntryOnChanged;
            _furiganaEntry.Changed += EntryOnChanged;
            _honyakuEntry.Changed  += EntryOnChanged;

            _mainVerticalBox.PackStart(table, false, false, 0);
            _mainVerticalBox.PackStart(new HSeparator(), false, true, 5);

            var hbbox = new HButtonBox {
                Layout = ButtonBoxStyle.End, Spacing = 10
            };

            _closeButton.Clicked   += CloseButtonOnClicked;
            _confirmButton.Clicked += ConfirmButtonOnClicked;
            hbbox.PackStart(_confirmButton);
            hbbox.PackStart(_closeButton);

            _mainVerticalBox.PackStart(hbbox, false, false, 0);

            Add(_mainVerticalBox);
            _tangoEntry.GrabFocus();

            ShowAll();
            EntryOnChanged(null, null);
        }
Ejemplo n.º 13
0
        public MainWindow(PlotBox[] graphs)
            : base()
        {
            //MainWindow Proprieties
            this.SetDefaultSize(400, 400);
            //this.SetIconFromFile ("../../icons/main_icon.ico");
            this.BorderWidth = 4;

            //background
            this.background = new Table(cellX, cellY, false);
            this.Add(background);
            background.RowSpacing    = 10;
            background.ColumnSpacing = 10;

            //monitor
            this.monitorFrame = new Frame();
            background.Attach(monitorFrame, 0, cellX - 1, 0, cellY - 1);
            this.monitor = new VBox();
            monitorFrame.Add(monitor);
            this.monitorDeck = new VBox();
            monitor.Add(monitorDeck);

            this.monitorSpace = new MonitorScrollableSpace(monitorDeck);

            //this.surface2d = new PlotSurface2D();

            //int[] x = { 1, 3, 5, 7, 9, 11, 13 };
            //int[] y = { 3, 4, 10, 11, 34, 1, 0 };


            //test filler
            //Image[] prova = new Image[20];
            //PlotWindow[] graphs = new PlotWindow[20];
            this.graphs = graphs;

            for (int i = 0; i < numberOfBox; i++)
            {
                //prova[i] = new Image("../../icons/Heartbeat.jpg");
                graphs[i] = new PlotBox(i + 1);
                monitorSpace.getContainer().PackStart(graphs[i], true, true, 4);
                monitorSpace.getContainer().Add(graphs[i]);
            }

            //warning
            this.warningFrame = new Frame();
            background.Attach(warningFrame, 0, cellX, cellY - 1, cellY);
            this.warningBox = new VBox();
            warningFrame.Add(warningBox);
            this.warningLabel = new Label(warningFillerText);
            warningBox.Add(warningLabel);

            //toolbar
            this.toolbarFrame = new Frame("Toolbar");
            this.toolbar      = new VBox();
            background.Attach(toolbarFrame, cellX - 1, cellX, 0, cellY - 1);
            toolbarFrame.Add(toolbar);
            toolbar.Spacing = 10;

            //login
            this.loginFrame        = new Frame("Account");
            loginFrame.BorderWidth = 10;
            this.loginBox          = new VBox();
            this.loginButtonBox    = new HButtonBox();
            this.loginButton       = new Button();
            toolbar.PackStart(loginFrame, false, false, 20);
            toolbar.Add(loginFrame);
            loginFrame.Add(loginBox);
            loginBox.PackStart(loginButtonBox, false, false, 10);
            loginBox.Add(loginButtonBox);
            loginButtonBox.PackStart(loginButton, false, false, 0);
            loginButtonBox.Add(loginButton);

            //image button
            this.imageBox     = new HBox();
            this.accountImage = new Image("../../icons/account.png");

            loginButton.Add(imageBox);
            imageBox.PackStart(accountImage, false, false, 3);
            imageBox.Add(accountImage);
            //accountImage.SetSizeRequest(128, 128);

            this.loginLabel = new Label(loginText);
            imageBox.PackStart(loginLabel, false, false, 0);
            imageBox.Add(loginLabel);

            //Buttons
            loginButton.Clicked += new EventHandler(OpenLoginWindow);
        }
Ejemplo n.º 14
0
        public void Run(object o, EventArgs e)
        {
            Console.WriteLine("EXECUTING ExiflowCreateVersion EXTENSION");

            Window win = new Window("window");

            dialog = new Dialog(dialog_name, win, Gtk.DialogFlags.DestroyWithParent);

            Frame frame_versions = new Frame("new version");
            HBox  hbox_versions  = new HBox();

            frame_versions.Child = hbox_versions;

            // RadioButtons left
            VBox vbox_versions_left = new VBox();

            hbox_versions.PackStart(vbox_versions_left, true, false, 0);
            // EntryBox right
            VBox vbox_versions_right = new VBox();

            hbox_versions.PackStart(vbox_versions_right, true, false, 0);
            vbox_versions_right.PackStart(new_version_entry, true, false, 0);
            vbox_versions_right.PackStart(overwrite_file_ok, true, false, 0);

            Frame frame_resulting_filename = new Frame("resulting filename");
            VBox  vbox_resulting_filename  = new VBox();

            frame_resulting_filename.Child = vbox_resulting_filename;
            vbox_resulting_filename.PackStart(new_filename_label, true, false, 0);
            vbox_resulting_filename.PackStart(overwrite_warning_label, true, false, 0);

            Frame frame_open_with = new Frame("open with");
            VBox  vbox_open_with  = new VBox();

            frame_open_with.Child = vbox_open_with;
            vbox_open_with.PackStart(new_filename_label, true, false, 0);


            new_version_entry.Changed += new EventHandler(on_new_version_entry_changed);
            overwrite_file_ok.Toggled += new EventHandler(on_overwrite_file_ok_toggled);

            gtk_cancel.UseStock = true;
            gtk_cancel.Clicked += CancelClicked;
            gtk_ok.UseStock     = true;
            gtk_ok.Clicked     += OkClicked;

            foreach (Photo p in App.Instance.Organizer.SelectedPhotos())
            {
                this.currentphoto = p;
                //Console.WriteLine ("MimeType: "+ Gnome.Vfs.MimeType.GetMimeTypeForUri (p.DefaultVersionUri.ToString ()));

                //uint default_id = p.DefaultVersionId;
                //Console.WriteLine ("DefaultVersionId: "+default_id);
                //string filename = GetNextIntelligentVersionFileNames (p)[0];

                string [] possiblefilenames = GetNextIntelligentVersionFileNames(p);
                new_version_entry.Text = GetVersionName(possiblefilenames[0].ToString());

                for (int i = 0; i < possiblefilenames.Length; i++)
                {
                    Gtk.RadioButton rb = new Gtk.RadioButton(versionrb, GetVersionName(possiblefilenames[i].ToString()));
                    rb.Clicked += new EventHandler(on_versionrb_changed);
                    vbox_versions_left.PackStart(rb, true, false, 0);
                }

                ComboBox owcb = GetComboBox();
                vbox_open_with.PackStart(owcb, false, true, 0);

                dialog.Modal        = false;
                dialog.TransientFor = null;
            }

            VBox vbox_main = new VBox();

            vbox_main.PackStart(frame_versions);
            vbox_main.PackStart(frame_resulting_filename);
            //vbox_main.PackStart (frame_open_with);

            HButtonBox hbb_ok_cancel = new HButtonBox();

            hbb_ok_cancel.PackStart(gtk_cancel, true, false, 0);
            hbb_ok_cancel.PackStart(gtk_ok, true, false, 0);

            dialog.VBox.PackStart(vbox_main, false, true, 0);
            dialog.ActionArea.PackStart(hbb_ok_cancel, false, true, 0);
            dialog.ShowAll();
        }
Ejemplo n.º 15
0
        public ConfigForm(Window parent) : base("設定")
        {
            TransientFor = parent;
            SetPosition(WindowPosition.CenterOnParent);

            var table = new Table(6, 2, false)
            {
                ColumnSpacing = 10,
                RowSpacing    = 10
            };

            table.Attach(new Label("DBファイラー")
            {
                Xalign = 1, WidthRequest = 130
            }, 0, 1, 0, 1, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            table.Attach(new Label("ヒントスピード(秒)")
            {
                Xalign = 1, WidthRequest = 130
            }, 0, 1, 2, 3, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            table.Attach(new Label("オートモードスピード(ミリ秒)")
            {
                Xalign = 1, WidthRequest = 130
            }, 0, 1, 4, 5, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);
            table.Attach(new Label("ゲームモード")
            {
                Xalign = 1, WidthRequest = 130
            }, 0, 1, 5, 6, AttachOptions.Shrink, AttachOptions.Shrink, 0, 0);

            var hbox = new HBox();

            hbox.PackStart(_dbDirectoryEntry, true, true, 0);
            hbox.PackStart(_dbDirectoryBrowse, false, false, 0);
            table.Attach(hbox, 1, 2, 0, 1, AttachOptions.Fill, AttachOptions.Fill, 0, 0);
            _dbDirectoryEntry.Text      = _configuration.StorageDir;
            _dbDirectoryBrowse.Clicked += DbDirectoryBrowseOnClicked;
            table.Attach(_showHint, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, 0, 0);
            _showHint.Active   = _configuration.ShowHint;
            _showHint.Toggled += ShowHintOnToggled;

            _hintScale.Sensitive = _configuration.ShowHint;
            _hintScale.Value     = _configuration.HintSpeed;
            table.Attach(_hintScale, 1, 2, 2, 3, AttachOptions.Fill, AttachOptions.Fill, 0, 0);

            table.Attach(_autoMode, 1, 2, 3, 4, AttachOptions.Fill, AttachOptions.Fill, 0, 0);
            _autoMode.Active   = _configuration.AutoMode;
            _autoMode.Toggled += AutoModeOnToggled;

            _autoModeScale.Sensitive = _configuration.AutoMode;
            _autoModeScale.Value     = _configuration.AutoModeSpeed;
            table.Attach(_autoModeScale, 1, 2, 4, 5, AttachOptions.Fill, AttachOptions.Fill, 0, 0);

            _simpleRadio = new RadioButton(_simpleRadio, GameMode.Simple.Label());
            _guessRadio  = new RadioButton(_simpleRadio, GameMode.GuessMode.Label());
            _inputRadio  = new RadioButton(_simpleRadio, GameMode.InputMode.Label())
            {
                Sensitive = false
            };

            _simpleRadio.Toggled += SimpleRadioOnToggled;
            _guessRadio.Toggled  += SimpleRadioOnToggled;
            _inputRadio.Toggled  += SimpleRadioOnToggled;

            switch (_configuration.GameMode)
            {
            case GameMode.Simple:
                _simpleRadio.Active = true;
                break;

            case GameMode.GuessMode:
                _guessRadio.Active = true;
                break;

            case GameMode.InputMode:
                _inputRadio.Active = true;
                break;
            }

            var gameModeHBox = new HBox(false, 20);
            var gameModeVBox = new VBox();

            gameModeVBox.PackStart(_simpleRadio, false, false, 0);
            gameModeVBox.PackStart(_guessRadio, false, false, 0);
            gameModeVBox.PackStart(_inputRadio, false, false, 0);
            gameModeHBox.PackStart(gameModeVBox, false, false, 0);

            var gameModeVBox2 = new VBox();

            _questionCombobox        = new ComboBox(TangoTypeUtil.LabelList());
            _questionCombobox.Active = _configuration.QuestionType.Index();
            gameModeVBox2.PackStart(new Label("質問")
            {
                Xalign = 0
            }, false, false, 0);
            gameModeVBox2.PackStart(_questionCombobox, false, false, 0);
            gameModeHBox.PackStart(gameModeVBox2, false, false, 0);

            var gameModeVBox3 = new VBox();

            _answerCombobox        = new ComboBox(TangoTypeUtil.LabelList());
            _answerCombobox.Active = _configuration.AnswerType.Index();
            gameModeVBox3.PackStart(new Label("回答")
            {
                Xalign = 0
            }, false, false, 0);
            gameModeVBox3.PackStart(_answerCombobox, false, false, 0);
            gameModeHBox.PackStart(gameModeVBox3, false, false, 0);

            table.Attach(gameModeHBox, 1, 2, 5, 6, AttachOptions.Fill, AttachOptions.Fill, 0, 0);

            _mainVerticalBox.PackStart(table, false, false, 0);
            _mainVerticalBox.PackStart(new HSeparator(), false, true, 5);

            var hbbox = new HButtonBox {
                Layout = ButtonBoxStyle.End, Spacing = 10
            };

            hbbox.PackStart(_confirmButton);
            hbbox.PackStart(_cancelButton);;
            _confirmButton.Clicked += ConfirmButtonOnClicked;
            _cancelButton.Clicked  += CancelButtonOnClicked;
            _mainVerticalBox.PackStart(hbbox);

            Add(_mainVerticalBox);
            ShowAll();
        }
Ejemplo n.º 16
0
        void Build()
        {
            BorderWidth   = 0;
            WidthRequest  = GtkWorkarounds.ConvertToPixelScale(901);
            HeightRequest = GtkWorkarounds.ConvertToPixelScale(632);

            Name           = "wizard_dialog";
            Title          = GettextCatalog.GetString("New Project");
            WindowPosition = WindowPosition.CenterOnParent;
            TransientFor   = IdeApp.Workbench.RootWindow;

            projectConfigurationWidget      = new GtkProjectConfigurationWidget();
            projectConfigurationWidget.Name = "projectConfigurationWidget";

            // Top banner of dialog.
            var topLabelEventBox = new EventBox();

            topLabelEventBox.Name          = "topLabelEventBox";
            topLabelEventBox.HeightRequest = GtkWorkarounds.ConvertToPixelScale(52);
            topLabelEventBox.ModifyBg(StateType.Normal, bannerBackgroundColor);
            topLabelEventBox.ModifyFg(StateType.Normal, whiteColor);
            topLabelEventBox.BorderWidth = 0;

            var topBannerTopEdgeLineEventBox = new EventBox();

            topBannerTopEdgeLineEventBox.Name          = "topBannerTopEdgeLineEventBox";
            topBannerTopEdgeLineEventBox.HeightRequest = 1;
            topBannerTopEdgeLineEventBox.ModifyBg(StateType.Normal, bannerLineColor);
            topBannerTopEdgeLineEventBox.BorderWidth = 0;

            var topBannerBottomEdgeLineEventBox = new EventBox();

            topBannerBottomEdgeLineEventBox.Name          = "topBannerBottomEdgeLineEventBox";
            topBannerBottomEdgeLineEventBox.HeightRequest = 1;
            topBannerBottomEdgeLineEventBox.ModifyBg(StateType.Normal, bannerLineColor);
            topBannerBottomEdgeLineEventBox.BorderWidth = 0;

            topBannerLabel      = new Label();
            topBannerLabel.Name = "topBannerLabel";
            Pango.FontDescription font = topBannerLabel.Style.FontDescription.Copy();              // UNDONE: VV: Use FontService?
            font.Size = (int)(font.Size * 1.8);
            topBannerLabel.ModifyFont(font);
            topBannerLabel.ModifyFg(StateType.Normal, whiteColor);
            var topLabelHBox = new HBox();

            topLabelHBox.Name = "topLabelHBox";
            topLabelHBox.PackStart(topBannerLabel, false, false, 20);
            topLabelEventBox.Add(topLabelHBox);

            VBox.PackStart(topBannerTopEdgeLineEventBox, false, false, 0);
            VBox.PackStart(topLabelEventBox, false, false, 0);
            VBox.PackStart(topBannerBottomEdgeLineEventBox, false, false, 0);

            // Main templates section.
            centreVBox      = new VBox();
            centreVBox.Name = "centreVBox";
            VBox.PackStart(centreVBox, true, true, 0);
            templatesHBox      = new HBox();
            templatesHBox.Name = "templatesHBox";
            centreVBox.PackEnd(templatesHBox, true, true, 0);

            // Template categories.
            var templateCategoriesBgBox = new EventBox();

            templateCategoriesBgBox.Name        = "templateCategoriesVBox";
            templateCategoriesBgBox.BorderWidth = 0;
            templateCategoriesBgBox.ModifyBg(StateType.Normal, categoriesBackgroundColor);
            templateCategoriesBgBox.WidthRequest = GtkWorkarounds.ConvertToPixelScale(220);
            var templateCategoriesScrolledWindow = new ScrolledWindow();

            templateCategoriesScrolledWindow.Name             = "templateCategoriesScrolledWindow";
            templateCategoriesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Template categories tree view.
            templateCategoriesTreeView                = new TreeView();
            templateCategoriesTreeView.Name           = "templateCategoriesTreeView";
            templateCategoriesTreeView.BorderWidth    = 0;
            templateCategoriesTreeView.HeadersVisible = false;
            templateCategoriesTreeView.Model          = templateCategoriesListStore;
            templateCategoriesTreeView.AppendColumn(CreateTemplateCategoriesTreeViewColumn());
            templateCategoriesScrolledWindow.Add(templateCategoriesTreeView);
            templateCategoriesBgBox.Add(templateCategoriesScrolledWindow);
            templatesHBox.PackStart(templateCategoriesBgBox, false, false, 0);

            // Templates.
            var templatesBgBox = new EventBox();

            templatesBgBox.ModifyBg(StateType.Normal, templateListBackgroundColor);
            templatesBgBox.Name         = "templatesVBox";
            templatesBgBox.WidthRequest = GtkWorkarounds.ConvertToPixelScale(400);
            templatesHBox.PackStart(templatesBgBox, false, false, 0);
            var templatesScrolledWindow = new ScrolledWindow();

            templatesScrolledWindow.Name             = "templatesScrolledWindow";
            templatesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Templates tree view.
            templatesTreeView                = new TreeView();
            templatesTreeView.Name           = "templatesTreeView";
            templatesTreeView.HeadersVisible = false;
            templatesTreeView.Model          = templatesListStore;
            templatesTreeView.AppendColumn(CreateTemplateListTreeViewColumn());
            templatesScrolledWindow.Add(templatesTreeView);
            templatesBgBox.Add(templatesScrolledWindow);

            // Template
            var templateEventBox = new EventBox();

            templateEventBox.Name = "templateEventBox";
            templateEventBox.ModifyBg(StateType.Normal, templateBackgroundColor);
            templatesHBox.PackStart(templateEventBox, true, true, 0);
            templateVBox             = new VBox();
            templateVBox.Visible     = false;
            templateVBox.BorderWidth = 20;
            templateVBox.Spacing     = 10;
            templateEventBox.Add(templateVBox);

            // Template large image.
            templateImage               = new ImageView();
            templateImage.Name          = "templateImage";
            templateImage.HeightRequest = GtkWorkarounds.ConvertToPixelScale(140);
            templateImage.WidthRequest  = GtkWorkarounds.ConvertToPixelScale(240);
            templateVBox.PackStart(templateImage, false, false, 10);

            // Template description.
            templateNameLabel              = new Label();
            templateNameLabel.Name         = "templateNameLabel";
            templateNameLabel.WidthRequest = GtkWorkarounds.ConvertToPixelScale(240);
            templateNameLabel.Wrap         = true;
            templateNameLabel.Xalign       = 0;
            templateNameLabel.Markup       = MarkupTemplateName("TemplateName");
            templateVBox.PackStart(templateNameLabel, false, false, 0);
            templateDescriptionLabel              = new Label();
            templateDescriptionLabel.Name         = "templateDescriptionLabel";
            templateDescriptionLabel.WidthRequest = GtkWorkarounds.ConvertToPixelScale(240);
            templateDescriptionLabel.Wrap         = true;
            templateDescriptionLabel.Xalign       = 0;
            templateVBox.PackStart(templateDescriptionLabel, false, false, 0);
            templateVBox.PackStart(new Label(), true, true, 0);

            // Template - button separator.
            var templateSectionSeparatorEventBox = new EventBox();

            templateSectionSeparatorEventBox.Name          = "templateSectionSeparatorEventBox";
            templateSectionSeparatorEventBox.HeightRequest = 1;
            templateSectionSeparatorEventBox.ModifyBg(StateType.Normal, templateSectionSeparatorColor);
            VBox.PackStart(templateSectionSeparatorEventBox, false, false, 0);

            // Buttons at bottom of dialog.
            var bottomHBox = new HBox();

            bottomHBox.Name = "bottomHBox";
            VBox.PackStart(bottomHBox, false, false, 0);

            // Cancel button - bottom left.
            var cancelButtonBox = new HButtonBox();

            cancelButtonBox.Name        = "cancelButtonBox";
            cancelButtonBox.BorderWidth = 16;
            cancelButton          = new Button();
            cancelButton.Name     = "cancelButton";
            cancelButton.Label    = "gtk-cancel";
            cancelButton.UseStock = true;
            cancelButtonBox.PackStart(cancelButton, false, false, 0);
            bottomHBox.PackStart(cancelButtonBox, false, false, 0);

            // Previous button - bottom right.
            var previousNextButtonBox = new HButtonBox();

            previousNextButtonBox.Name        = "previousNextButtonBox";
            previousNextButtonBox.BorderWidth = 16;
            previousNextButtonBox.Spacing     = 9;
            bottomHBox.PackStart(previousNextButtonBox);
            previousNextButtonBox.Layout = ButtonBoxStyle.End;

            previousButton           = new Button();
            previousButton.Name      = "previousButton";
            previousButton.Label     = GettextCatalog.GetString("Previous");
            previousButton.Sensitive = false;
            previousNextButtonBox.PackEnd(previousButton);

            // Next button - bottom right.
            nextButton       = new Button();
            nextButton.Name  = "nextButton";
            nextButton.Label = GettextCatalog.GetString("Next");
            previousNextButtonBox.PackEnd(nextButton);

            // Remove default button action area.
            VBox.Remove(ActionArea);

            if (Child != null)
            {
                Child.ShowAll();
            }

            Show();

            templatesTreeView.HasFocus = true;
            Resizable = false;
        }
        void Build()
        {
            BorderWidth   = 0;
            DefaultWidth  = 990;
            DefaultHeight = 610;

            Modal          = true;
            Name           = "NewProjectDialog";
            Title          = Catalog.GetString("New Project");
            WindowPosition = WindowPosition.CenterOnParent;

            projectConfigurationWidget = new ProjectConfigurationWidget();

            // Top banner of dialog.
            var topLabelEventBox = new EventBox();

            topLabelEventBox.HeightRequest = 56;
            topLabelEventBox.ModifyBg(StateType.Normal, bannerBackgroundColor);
            topLabelEventBox.ModifyFg(StateType.Normal, whiteColor);
            topLabelEventBox.BorderWidth = 0;

            var topBannerBottomEdgeLineEventBox = new EventBox();

            topBannerBottomEdgeLineEventBox.HeightRequest = 1;
            topBannerBottomEdgeLineEventBox.ModifyBg(StateType.Normal, bannerLineColor);
            topBannerBottomEdgeLineEventBox.BorderWidth = 0;

            topBannerLabel      = new Label();
            topBannerLabel.Text = chooseTemplateBannerText;
            Pango.FontDescription font = topBannerLabel.Style.FontDescription.Copy();
            font.Size = (int)(font.Size * 1.8);
            topBannerLabel.ModifyFont(font);
            topBannerLabel.ModifyFg(StateType.Normal, whiteColor);
            var topLabelHBox = new HBox();

            topLabelHBox.PackStart(topBannerLabel, false, false, 20);
            topLabelEventBox.Add(topLabelHBox);

            VBox.PackStart(topLabelEventBox, false, false, 0);
            VBox.PackStart(topBannerBottomEdgeLineEventBox, false, false, 0);

            // Main templates section.
            centreVBox = new VBox();
            VBox.PackStart(centreVBox, true, true, 0);
            templatesHBox = new HBox();
            centreVBox.PackEnd(templatesHBox, true, true, 0);

            // Template categories.
            var templateCategoriesVBox = new VBox();

            templateCategoriesVBox.BorderWidth  = 0;
            templateCategoriesVBox.WidthRequest = 242;
            var templateCategoriesScrolledWindow = new ScrolledWindow();

            templateCategoriesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Template categories tree view.
            templateCategoriesTreeView                = new TreeView();
            templateCategoriesTreeView.BorderWidth    = 0;
            templateCategoriesTreeView.HeadersVisible = false;
            templateCategoriesTreeView.Model          = templateCategoriesListStore;
            templateCategoriesTreeView.ModifyBase(StateType.Normal, categoriesBackgroundColor);
            templateCategoriesTreeView.ModifyBase(StateType.Selected, selectedRowBackgroundColor);
            templateCategoriesTreeView.ModifyText(StateType.Selected, whiteColor);
            templateCategoriesTreeView.AppendColumn(CreateTemplateCategoriesTreeViewColumn());
            templateCategoriesScrolledWindow.Add(templateCategoriesTreeView);
            templateCategoriesVBox.PackStart(templateCategoriesScrolledWindow, true, true, 0);
            templatesHBox.PackStart(templateCategoriesVBox, false, false, 0);

            // Templates.
            var templatesVBox = new VBox();

            templatesVBox.WidthRequest = 242;
            templatesHBox.PackStart(templatesVBox, false, false, 0);
            var templatesScrolledWindow = new ScrolledWindow();

            templatesScrolledWindow.HscrollbarPolicy = PolicyType.Never;

            // Templates tree view.
            templatesTreeView = new TreeView();
            templatesTreeView.HeadersVisible = false;
            templatesTreeView.Model          = templatesListStore;
            templatesTreeView.ModifyBase(StateType.Normal, templateListBackgroundColor);
            templatesTreeView.ModifyBase(StateType.Selected, selectedRowBackgroundColor);
            templatesTreeView.ModifyText(StateType.Selected, whiteColor);
            templatesTreeView.AppendColumn(CreateTemplateListTreeViewColumn());
            templatesScrolledWindow.Add(templatesTreeView);
            templatesVBox.PackStart(templatesScrolledWindow, true, true, 0);

            // Template
            var templateEventBox = new EventBox();

            templateEventBox.ModifyBg(StateType.Normal, templateBackgroundColor);
            templatesHBox.PackStart(templateEventBox, true, true, 0);
            templateVBox         = new VBox();
            templateVBox.Visible = false;
            templateEventBox.Add(templateVBox);

            // Template large image.
            templateImage = new Gtk.Image();
            templateImage.HeightRequest = 300;
            templateVBox.PackStart(templateImage, false, false, 20);

            // Template description.
            var templateNameHBox = new HBox();

            templateNameLabel = new Label();
            templateNameHBox.PackStart(templateNameLabel, false, false, 40);
            var templateNamePaddingLabel = new Label();

            templateNameHBox.PackStart(templateNamePaddingLabel, true, true, 0);
            templateVBox.PackStart(templateNameHBox, false, false, 0);
            var templateDescriptionHBox = new HBox();

            templateDescriptionLabel              = new Label();
            templateDescriptionLabel.Wrap         = true;
            templateDescriptionLabel.WidthRequest = 400;
            templateDescriptionHBox.PackStart(templateDescriptionLabel, false, false, 40);
            var templateDescriptionPaddingLabel = new Label();

            templateDescriptionHBox.PackStart(templateDescriptionPaddingLabel, true, true, 0);
            templateVBox.PackStart(templateDescriptionHBox, true, true, 10);
            templateVBox.PackStart(new Label(), true, true, 0);

            // Template - button separator.
            var templateSectionSeparatorEventBox = new EventBox();

            templateSectionSeparatorEventBox.HeightRequest = 1;
            templateSectionSeparatorEventBox.ModifyBg(StateType.Normal, templateSectionSeparatorColor);
            VBox.PackStart(templateSectionSeparatorEventBox, false, false, 0);

            // Buttons at bottom of dialog.
            var bottomHBox = new HBox();

            VBox.PackStart(bottomHBox, false, false, 0);

            // Cancel button - bottom left.
            var cancelButtonBox = new HButtonBox();

            cancelButtonBox.BorderWidth = 16;
            cancelButton          = new Button();
            cancelButton.Label    = "gtk-cancel";
            cancelButton.UseStock = true;
            cancelButtonBox.PackStart(cancelButton, false, false, 0);
            bottomHBox.PackStart(cancelButtonBox, false, false, 0);

            // Previous button - bottom right.
            var previousNextButtonBox = new HButtonBox();

            previousNextButtonBox.BorderWidth = 16;
            previousNextButtonBox.Spacing     = 9;
            bottomHBox.PackStart(previousNextButtonBox);
            previousNextButtonBox.Layout = ButtonBoxStyle.End;

            previousButton           = new Button();
            previousButton.Label     = Catalog.GetString("Previous");
            previousButton.Sensitive = false;
            previousNextButtonBox.PackEnd(previousButton);

            // Next button - bottom right.
            nextButton       = new Button();
            nextButton.Label = Catalog.GetString("Next");
            previousNextButtonBox.PackEnd(nextButton);

            // Remove default button action area.
            VBox.Remove(ActionArea);

            if (Child != null)
            {
                Child.ShowAll();
            }

            Show();

            VBox.BorderWidth = 0;
        }
Ejemplo n.º 18
0
        private void Initialize()
        {
            SetDefaultSize(300, 0);

            AddButton("Ok", ResponseType.Ok);
            AddButton("Cancel", ResponseType.Cancel);

            var grid = new Grid
            {
                ColumnSpacing = 10,
                RowSpacing    = 10,
                Hexpand       = true,
            };

            entrySubject = new Entry {
                Hexpand = true
            };
            entrySecretary = new Entry {
                Hexpand = true
            };
            entryDate = new Entry {
                Hexpand = true
            };

            grid.Attach(new Label("Subject")
            {
                Halign = Align.End
            }, 0, 0, 1, 1);
            grid.Attach(entrySubject, 1, 0, 1, 1);
            grid.Attach(new Label("Date")
            {
                Halign = Align.End
            }, 0, 1, 1, 1);
            grid.Attach(entryDate, 1, 1, 1, 1);
            grid.Attach(new Label("Secretary")
            {
                Halign = Align.End
            }, 0, 2, 1, 1);
            grid.Attach(entrySecretary, 1, 2, 1, 1);


            nodeViewParticiapnts = CreateNodeView <ParticipantModel>();

            grid.Attach(new Label("Participants")
            {
                Halign = Align.End, Valign = Align.Start
            }, 0, 3, 1, 1);
            var participantsVBox = new VBox()
            {
                Spacing = 10
            };
            var participantsButtonBox = new HButtonBox {
                Halign = Align.Start
            };
            var addParticipantButton = new Button {
                Label = "Add participant"
            };

            addParticipantButton.Clicked += AddParticipantButton_Clicked;;
            participantsButtonBox.PackStart(addParticipantButton, false, false, 0);
            participantsVBox.PackStart(participantsButtonBox, false, false, 0);
            participantsVBox.PackStart(nodeViewParticiapnts, true, true, 0);
            grid.Attach(participantsVBox, 1, 3, 1, 1);


            nodeViewDecisions = CreateNodeView <DecisionModel>();

            grid.Attach(new Label("Decisions")
            {
                Halign = Align.End, Valign = Align.Start
            }, 0, 4, 1, 1);
            var decisionsVBox = new VBox()
            {
                Spacing = 10
            };
            var decisionsButtonBox = new HButtonBox()
            {
                Halign = Align.Start
            };
            var addDecisionButton = new Button {
                Label = "Add decision"
            };

            addDecisionButton.Clicked += AddDecisionButton_Clicked;;
            decisionsButtonBox.PackStart(addDecisionButton, false, false, 0);
            decisionsVBox.PackStart(decisionsButtonBox, false, false, 0);
            decisionsVBox.PackStart(nodeViewDecisions, true, true, 0);
            grid.Attach(decisionsVBox, 1, 4, 1, 1);

            ContentArea.PackStart(grid, true, true, 10);
        }
Ejemplo n.º 19
0
        public FlashCardForm(Window parent) : base("ゲーム")
        {
            SetSizeRequest(900, 550);
            TransientFor = parent;
            SetPosition(WindowPosition.CenterOnParent);
            AddAccelGroup(_accelGroup);

            _descriptionHBox.PackStart(_currentCardIndex, false, false, 0);

            _mainVerticalBox.PackStart(_descriptionHBox, false, true, 0);

            _frameVerticalBox.PackStart(new Label(), true, false, 0);
            _frameVerticalBox.PackStart(_cardLabelTango, false, false, 20);
            _hintVerticalBox.PackStart(_cardLabelKanji, false, false, 0);
            _hintVerticalBox.PackStart(_cardLabelFurigana, false, false, 0);
            _hintVerticalBox.PackStart(_cardLabelRomaji, false, false, 0);
            _hintVerticalBox.PackStart(_cardLabelHonyaku, false, false, 0);
            _frameVerticalBox.PackStart(_hintVerticalBox, false, false, 0);
            _frameVerticalBox.PackStart(new Label(), true, false, 0);

            _mainVerticalBox.PackStart(_frameVerticalBox, true, true, 0);

            switch (_configuration.GameMode)
            {
            case GameMode.Simple:
                break;

            case GameMode.GuessMode:
                _descriptionHBox.PackStart(_scoreDescription);
                var key = new List <Gdk.Key>
                {
                    Gdk.Key.q,
                    Gdk.Key.w,
                    Gdk.Key.e,
                    Gdk.Key.a,
                    Gdk.Key.s,
                    Gdk.Key.d
                };

                for (var i = 0; i < _guessButtonList.Count; i++)
                {
                    if (_configuration.AnswerType == TangoType.Kanji ||
                        _configuration.AnswerType == TangoType.Hiragana)
                    {
                        _guessButtonList[i].SetFontSize(20);
                    }
                    else
                    {
                        _guessButtonList[i].SetFontSize(12);
                    }

                    _guessButtonList[i].SetButtonColor(_defaultColor);
                    _guessButtonList[i].Label         = $"回答{i}";
                    _guessButtonList[i].HeightRequest = 50;
                    _guessButtonList[i].WidthRequest  = 270;
                    _guessButtonList[i].Sensitive     = false;
                    _guessButtonList[i].AddAccelerator("activate", _accelGroup,
                                                       new AccelKey(key[i], ModifierType.None, AccelFlags.Visible));
                    _guessButtonList[i].Clicked += OnClicked;
                }
                _guessTopBox.PackStart(_guessButtonList[0], false, false, 10);
                _guessTopBox.PackStart(_guessButtonList[1], false, false, 10);
                _guessTopBox.PackStart(_guessButtonList[2], false, false, 10);

                _guessBottomBox.PackStart(_guessButtonList[3], false, false, 10);
                _guessBottomBox.PackStart(_guessButtonList[4], false, false, 10);
                _guessBottomBox.PackStart(_guessButtonList[5], false, false, 10);

                _mainVerticalBox.PackStart(_guessTopBox, false, false, 0);
                _mainVerticalBox.PackStart(_guessBottomBox, false, false, 0);
                break;

            case GameMode.InputMode:
                break;
            }

            _mainVerticalBox.PackStart(new HSeparator(), false, true, 5);

            var hbbox = new HButtonBox {
                Spacing = 10, Layout = ButtonBoxStyle.Center
            };

            hbbox.PackStart(_startButton, false, false, 0);
            hbbox.PackStart(_backButton, false, false, 0);
            _mainVerticalBox.PackStart(hbbox, false, false, 0);
            _startButton.GrabFocus();
            _startButton.Clicked += StartButtonOnClicked;
            _backButton.Clicked  += BackButtonOnClicked;

            Add(_mainVerticalBox);
            ShowAll();

            _flashCardService.HintRequested += FlashCardServiceOnHintRequested;
        }
Ejemplo n.º 20
0
        /// <summary>
        /// Set up the widgets
        /// </summary>
        /// <returns>
        /// Widget to display
        /// </returns>
        private void InitializeWidgets()
        {
            this.Spacing     = 10;
            this.BorderWidth = 10;

            // Set up the iFolder2.x Accounts tree view in a scrolled window
            AccTreeView = new iFolderTreeView();
            ScrolledWindow sw = new ScrolledWindow();

            sw.ShadowType = Gtk.ShadowType.EtchedIn;
            sw.Add(AccTreeView);
            this.PackStart(sw, true, true, 0);

            AccTreeStore      = new ListStore(typeof(string));
            AccTreeView.Model = AccTreeStore;

            // User Name Column
            TreeViewColumn serverColumn = new TreeViewColumn();

            serverColumn.Title = Util.GS("User Name");
            CellRendererText servercr = new CellRendererText();

            servercr.Xpad = 5;
            serverColumn.PackStart(servercr, false);
            serverColumn.SetCellDataFunc(servercr,
                                         new TreeCellDataFunc(ServerCellTextDataFunc));
            serverColumn.Resizable = true;
            serverColumn.MinWidth  = 150;
            AccTreeView.AppendColumn(serverColumn);

            // Home Location Column
            TreeViewColumn nameColumn = new TreeViewColumn();

            nameColumn.Title = Util.GS("Home Location");
            CellRendererText ncrt = new CellRendererText();

            nameColumn.PackStart(ncrt, false);
            nameColumn.SetCellDataFunc(ncrt,
                                       new TreeCellDataFunc(NameCellTextDataFunc));
            nameColumn.Resizable = true;
            nameColumn.MinWidth  = 150;
            AccTreeView.AppendColumn(nameColumn);

            AccTreeView.Selection.Mode     = SelectionMode.Single;
            AccTreeView.Selection.Changed +=
                new EventHandler(AccSelectionChangedHandler);

            // Status column
            TreeViewColumn statusColumn = new TreeViewColumn();

            statusColumn.Title = Util.GS("Status");
            CellRendererText stat = new CellRendererText();

            stat.Xpad = 5;
            statusColumn.PackStart(stat, false);
            statusColumn.SetCellDataFunc(stat, new TreeCellDataFunc(statusCellTextDataFunc));
            statusColumn.Resizable = true;
            statusColumn.MinWidth  = 150;
            AccTreeView.AppendColumn(statusColumn);

            // Set up buttons for add/remove/accept/decline
            HButtonBox buttonBox = new HButtonBox();

            buttonBox.Spacing = 10;
            buttonBox.Layout  = ButtonBoxStyle.End;
            this.PackStart(buttonBox, false, false, 0);

            //AddButton = new Button("Add");
//			buttonBox.PackStart(AddButton);

            MigrateButton = new Button("_Migrate");
            buttonBox.PackStart(MigrateButton);
            MigrateButton.Clicked += new EventHandler(OnMigrateAccount);

            DetailsButton = new Button(Gtk.Stock.Properties);
            buttonBox.PackStart(DetailsButton);
            DetailsButton.Clicked += new EventHandler(OnDetailsClicked);

            AccTreeView.RowActivated += new RowActivatedHandler(
                OnAccTreeRowActivated);
        }
Ejemplo n.º 21
0
            private void DecorateUI()
            {
                HButtonBox actionArea = new HButtonBox ();

                actionArea.LayoutStyle = ButtonBoxStyle.End;
                Button button = new Button (Stock.Ok);
                button.Clicked += OnActivated;
                actionArea.PackStart (button,
                              false, false, 4);

                serverNameEntry = new Entry ();
                portEntry = new Entry ();
                usernameEntry = new Entry ();
                passwordEntry = new Entry ();
                passwordEntry.Visibility = false;
                passwordEntry.Activated += OnActivated;

                guestLoginCheckButton = new CheckButton ();

                Table table = new Table (5, 2, false);
                uint row = 0;
                // left, right, top, bottom
                Label label =
                    new Label (Catalog.
                           GetString ("Server"));
                label.Xalign = 0;
                uint width = 1;
                AttachToTable (table, label, 0, row, width);
                AttachToTable (table, serverNameEntry, 1, row,
                           width);
                row++;

                label = new Label (Catalog.
                           GetString ("Port"));
                label.Xalign = 0;
                AttachToTable (table, label, 0, row, 1);
                AttachToTable (table, portEntry, 1, row, 1);
                row++;

                label = new Label (Catalog.
                           GetString ("Guest Login"));
                label.Xalign = 0;
                AttachToTable (table, label, 0, row, 1);
                AttachToTable (table, guestLoginCheckButton,
                           1, row, 1);
                row++;

                label = new Label (Catalog.
                           GetString ("Username"));
                label.Xalign = 0;
                AttachToTable (table, label, 0, row, 1);
                AttachToTable (table, usernameEntry, 1, row,
                           1);
                row++;

                label = new Label (Catalog.
                           GetString ("Password"));
                label.Xalign = 0;
                AttachToTable (table, label, 0, row, 1);
                AttachToTable (table, passwordEntry, 1, row,
                           1);
                row++;

                label = new Label (Catalog.
                           GetString
                           ("<big><big><b>Login</b></big></big>"));
                label.Xalign = 0;
                label.Xpad = 2;
                label.UseMarkup = true;
                VBox vbox = new VBox ();
                vbox.PackStart (label, false, true, 4);
                vbox.PackStart (table, false, false, 4);
                vbox.PackStart (actionArea, false, true, 4);
                Child = vbox;
            }
Ejemplo n.º 22
0
        private void build()
        {
            this.Title = "New Battlelords Character";
            {
                // page 1 - intro
                Gtk.TextView   tv = new Gtk.TextView();
                Gtk.TextBuffer tb;
                tb = tv.Buffer;
                //tb.Text = MediaManager.GetHtml("intro.html");
                tb.Text = "Welcome to the Battlelords Character Asistant.\n" +
                          "\nThis will guide you thru the initial player character generation. " +
                          "You will be presented with some initial options that can not change " +
                          "once the character is created. " +
                          "\nStep 1" +
                          "\nStep 2" +
                          "\nStep 3" +
                          "\nStep 4" +
                          "\nConculsion";
                tv.WrapMode = WrapMode.Word;
                tv.Editable = false;

                this.AppendPage(tv);
                this.SetPageTitle(tv, "Introduction");
                this.SetPageType(tv, AssistantPageType.Intro);
                this.SetPageComplete(tv, true);
            }
            {
                // page 2 - rolling method
                string method1 = "Percentile dice are rolled and marked down in order of the given visual statistics. " +
                                 "Eight rolls are initially made. The player then makes three additional dice rolls. " +
                                 "He has the option of replacing any three previously rolled statistics with one of these number. " +
                                 "Players may not move rolls around! First roll is Strength, second roll is Manual Dexterity, etc.";
                Gtk.VBox     vb      = new Gtk.VBox();
                Gtk.HBox     hb1     = new Gtk.HBox();
                Gtk.Label    lb1     = new Gtk.Label("Rolling Method");
                string[]     entries = { "Method 1", "Method 2", "Method 3", "Fill In" };
                Gtk.ComboBox cb1     = new Gtk.ComboBox(entries);
                hb1.PackStart(lb1, true, false, 0);
                hb1.PackEnd(cb1, true, false, 0);
                cb1.Active = 0;
                Gtk.HBox        hb2 = new Gtk.HBox();
                Gtk.CheckButton b1  = new Gtk.CheckButton("Max Body Points");
                Gtk.CheckButton b2  = new Gtk.CheckButton("Max Starting Money");
                b1.Active = true;
                b2.Active = true;
                hb2.PackStart(b1, true, false, 1);
                hb2.PackEnd(b2, true, false, 1);
                Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
                Gtk.TextView       tv = new Gtk.TextView();
                tv.WrapMode = WrapMode.Word;
                tv.Editable = false;
                Gtk.TextBuffer tb = tv.Buffer;
                tb.Text = method1;
                sw.Add(tv);
                //vb.PackStart(hb1, false, false, 0);
                vb.PackStart(hb2, false, false, 0);
                //vb.PackEnd(sw, true, true, 0);

                this.AppendPage(vb);
                this.SetPageTitle(vb, "Rolling Options");
                this.SetPageType(vb, AssistantPageType.Content);
                this.SetPageComplete(vb, true);
            }
            {
                // page 3 - race
                TreeStore ts = new TreeStore(typeof(string), typeof(string));
                foreach (BattlelordsRace r in this.session.Races)
                {
                    ts.AppendValues(r.Name, r.Name);
                }
                TreeView tv = new TreeView(ts);
                tv.HeadersVisible = true;
                tv.AppendColumn("Battlelords Race", new CellRendererText(), "text", 0);

                this.AppendPage(tv);
                this.SetPageTitle(tv, "Select Race");
                this.SetPageType(tv, AssistantPageType.Content);
                this.SetPageComplete(tv, true);
            }
            {
                // page 4 - Basics page

                /*
                 * 1 char name
                 * 2 player name
                 * 3 height
                 * 4 weight
                 * 5 body pts
                 * 6 start money
                 */
                Gtk.VBox vb2 = new Gtk.VBox();

                Gtk.HBox  hb1 = new Gtk.HBox();
                Gtk.Label lb1 = new Gtk.Label("Player's Name:");
                Gtk.Entry en1 = new Gtk.Entry();
                hb1.PackStart(lb1, false, false, 0);
                hb1.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb1.PackEnd(en1, true, true, 0);

                Gtk.HBox  hb2 = new Gtk.HBox();
                Gtk.Label lb2 = new Gtk.Label("Character's Name:");
                Gtk.Entry en2 = new Gtk.Entry();
                hb2.PackStart(lb2, false, false, 0);
                hb2.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb2.PackEnd(en2, true, true, 0);

                Gtk.HBox  hb3 = new Gtk.HBox();
                Gtk.Label lb3 = new Gtk.Label("Height (ft):");
                Gtk.Entry en3 = new Gtk.Entry();
                en3.Sensitive = false;
                Gtk.Button b3 = new Gtk.Button();
                //b3.Label = "roll";
                b3.TooltipText = "Click here to roll height.";
                b3.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb3.PackStart(lb3, false, false, 0);
                hb3.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb3.PackStart(en3, true, true, 0);
                hb3.PackEnd(b3, false, false, 0);

                Gtk.HBox  hb4 = new Gtk.HBox();
                Gtk.Label lb4 = new Gtk.Label("Weight (lbs):");
                Gtk.Entry en4 = new Gtk.Entry();
                en4.Sensitive = false;
                Gtk.Button b4 = new Gtk.Button();
                //b4.Label = "roll";
                b4.TooltipText = "Click here to roll for weight.";
                b4.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb4.PackStart(lb4, false, false, 0);
                hb4.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb4.PackStart(en4, true, true, 0);
                hb4.PackEnd(b4, false, false, 0);

                Gtk.HBox  hb5 = new Gtk.HBox();
                Gtk.Label lb5 = new Gtk.Label("Body Points:");
                Gtk.Entry en5 = new Gtk.Entry();
                en5.Sensitive = false;
                Gtk.Button b5 = new Gtk.Button();
                b5.TooltipText = "Click here to roll for body points.";
                b5.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb5.PackStart(lb5, false, false, 0);
                hb5.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb5.PackStart(en5, true, true, 0);
                hb5.PackEnd(b5, false, false, 0);

                Gtk.HBox  hb6 = new Gtk.HBox();
                Gtk.Label lb6 = new Gtk.Label("Starting Money:");
                Gtk.Entry en6 = new Gtk.Entry();
                en6.Sensitive = false;
                Gtk.Button b6 = new Gtk.Button();
                b6.TooltipText = "Click here to roll for starting money.";
                b6.Image       = MediaManager.GetImageFromBaseFile("dice.png");
                hb6.PackStart(lb6, false, false, 0);
                hb6.PackStart(new Gtk.HSeparator(), true, false, 0);
                hb6.PackStart(en6, true, true, 0);
                hb6.PackEnd(b6, false, false, 0);

                vb2.PackStart(hb1, false, false, 0);
                vb2.PackStart(hb2, false, false, 0);
                vb2.PackStart(hb3, false, false, 0);
                vb2.PackStart(hb4, false, false, 0);
                vb2.PackStart(hb5, false, false, 0);
                vb2.PackStart(hb6, false, false, 0);

                this.AppendPage(vb2);
                this.SetPageTitle(vb2, "Enter Basic Information");
                this.SetPageType(vb2, AssistantPageType.Content);
                this.SetPageComplete(vb2, true);
            }
            {
                // page 5 - vitals
                VBox         vb5 = new VBox();
                Gtk.Notebook nb  = new Gtk.Notebook();
                //Battle.Gui.VitalsControl stvc = new Battle.Gui.VitalsControl(this.session);
                //stvc.Sensitive = false;
                VitalsControl m1vitals   = new VitalsControl(this.session);
                VitalsControl m2vitals   = new VitalsControl(this.session);
                VitalsControl m3vitals   = new VitalsControl(this.session);
                VitalsControl fillvitals = new VitalsControl(this.session);

                m1vitals.Enabled = false;
                m2vitals.Enabled = false;
                m3vitals.Enabled = false;

                nb.AppendPage(m1vitals, new Gtk.Label("Method 1"));
                nb.AppendPage(m2vitals, new Gtk.Label("Method 2"));
                nb.AppendPage(m3vitals, new Gtk.Label("Method 3"));
                nb.AppendPage(fillvitals, new Gtk.Label("Fill In"));

                HButtonBox bb5     = new HButtonBox();
                Button     rollBtn = new Button(Stock.Execute);
                rollBtn.Clicked += delegate(object sender, EventArgs e) {
                    Console.WriteLine("{0}", sender.GetType().ToString());
                };
                rollBtn.Label = "Roll";
                Button saveBtn = new Button(Stock.Save);
                saveBtn.Label = "Save";
                bb5.PackStart(rollBtn);
                bb5.PackEnd(saveBtn);
                nb.SwitchPage += delegate(object o, SwitchPageArgs args) {
                    if (args.PageNum == 3)
                    {
                        rollBtn.Sensitive = false;
                    }
                    else
                    {
                        rollBtn.Sensitive = true;
                    }
                };

                vb5.Add(nb);
                vb5.Add(bb5);

                this.AppendPage(vb5);
                this.SetPageTitle(vb5, "Enter Vitals");
                this.SetPageType(vb5, AssistantPageType.Content);
                this.SetPageComplete(vb5, true);
            }
            {
                // page 6 - secondaries
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Enter Secondary Attributes");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 7 - fate
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Determine Fate");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 8 - social
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Social Status");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 9 - skills
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Choose Initial Skills");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 10 - matrixes
                Gtk.Label             not_completed_label = new Gtk.Label("not completed");
                Pango.FontDescription d = new Pango.FontDescription();
                d.Style = Pango.Style.Italic;
                not_completed_label.ModifyFont(d);

                this.AppendPage(not_completed_label);
                this.SetPageTitle(not_completed_label, "Choose Initial Matrixes");
                this.SetPageType(not_completed_label, AssistantPageType.Content);
                this.SetPageComplete(not_completed_label, true);
            }
            {
                // page 11 - confirm
                TextView   tv11 = new TextView();
                TextBuffer b11  = tv11.Buffer;
                b11.Text      = "Confirm this new character.";
                tv11.Editable = false;
                this.AppendPage(tv11);
                this.SetPageTitle(tv11, "Confirm New Character");
                this.SetPageType(tv11, AssistantPageType.Confirm);
                this.SetPageComplete(tv11, true);
            }
            this.Close  += HandleHandleClose;
            this.Cancel += HandleHandleCancel;
            this.ShowAll();
        }