コード例 #1
0
        void BuildGui()
        {
            ContentName = "SkiaSharp Fiddle";

            _headerBox.PackStart(_widthLabel, false, false, 0);
            _headerBox.PackStart(_widthEntry, false, false, 0);
            _headerBox.PackStart(_heightLabel, false, false, 0);
            _headerBox.PackStart(_heightEntry, false, false, 0);

            _codeBox.PackStart(_codeLabel, false, false, 0);
            _codeBox.PackEnd(_textEditor, true, true, 0);
            _codeFrame.Add(_codeBox);

            _outputBox.PackStart(_outputLabel, false, false, 0);
            _outputBox.PackEnd(_skWidget, true, true, 0);
            _outputFrame.Add(_outputBox);

            _contentBox.Pack1(_codeFrame, true, true);
            _contentBox.Pack2(_outputFrame, false, false);

            _messagesBox.PackStart(_messagesLabel, false, false, 0);
            _messagesBox.PackEnd(_messagesView, true, true, 0);
            _messagesFrame.Add(_messagesBox);

            _mainBox.PackStart(_headerBox, false, false, 0);
            _mainBox.PackStart(_contentBox, true, true, 0);
            _mainBox.PackStart(_messagesFrame, true, true, 0);

            _mainBox.ShowAll();
        }
コード例 #2
0
        public AddUnitTestDialog(MonoDevelop.Ide.Gui.Document document, MethodDeclarationSyntax currentMethod, GeneratedTest generatedTestModel)
        {
            _testGeneratorService = CompositionManager.Instance.GetExportedValue <ITestGeneratorService>();
            _currentMethod        = currentMethod;
            _document             = document;
            _generatedTestModel   = generatedTestModel;
            WindowPosition        = WindowPosition.CenterAlways;
            Title = "Add Unit test method";

            //entry setup
            _unitTestNameTitle = new Label
            {
                Text = "Unit test name:"
            };

            _unitTestName            = new Entry();
            _unitTestName.Activated += EntryActivated;

            //button setup
            _confirm = new Button
            {
                Label = "Create"
            };
            _confirm.Clicked += Confirm_Clicked;

            VBox.Add(_unitTestNameTitle);
            VBox.Add(_unitTestName);
            VBox.Add(_confirm);

            VBox.ShowAll();
        }
コード例 #3
0
        public ParameterInformationWindow()
        {
            WindowTransparencyDecorator.Attach(this);

            headlabel        = new MonoDevelop.Components.FixedWidthWrapLabel();
            headlabel.Indent = -20;

            headlabel.Wrap = Pango.WrapMode.WordChar;
            headlabel.BreakOnCamelCasing = false;
            headlabel.BreakOnPunctuation = false;
            descriptionBox.Spacing       = 4;
            VBox vb = new VBox(false, 0);

            vb.PackStart(headlabel, true, true, 0);
            vb.PackStart(descriptionBox, true, true, 0);

            HBox hb = new HBox(false, 0);

            hb.PackStart(vb, true, true, 0);

            vb2.Spacing = 4;
            vb2.PackStart(hb, true, true, 0);
            Content = BackendHost.ToolkitEngine.WrapWidget(vb2, Xwt.NativeWidgetSizing.DefaultPreferredSize);

            UpdateStyle();
            Styles.Changed += HandleThemeChanged;
            IdeApp.Preferences.ColorScheme.Changed += HandleThemeChanged;

            vb2.ShowAll();
            //DesktopService.RemoveWindowShadow (this);
            Content.BoundsChanged += Content_BoundsChanged;
        }
コード例 #4
0
ファイル: DockFrame.cs プロジェクト: rdafoe/Cage
        public DockFrame()
        {
            shadedContainer = new ShadedContainer();

            dockBarTop    = new DockBar(this, Gtk.PositionType.Top);
            dockBarBottom = new DockBar(this, Gtk.PositionType.Bottom);
            dockBarLeft   = new DockBar(this, Gtk.PositionType.Left);
            dockBarRight  = new DockBar(this, Gtk.PositionType.Right);

            container = new DockContainer(this);
            HBox hbox = new HBox();

            hbox.PackStart(dockBarLeft, false, false, 0);
            hbox.PackStart(container, true, true, 0);
            hbox.PackStart(dockBarRight, false, false, 0);
            mainBox = new VBox();
            mainBox.PackStart(dockBarTop, false, false, 0);
            mainBox.PackStart(hbox, true, true, 0);
            mainBox.PackStart(dockBarBottom, false, false, 0);
            Add(mainBox);
            mainBox.ShowAll();
            mainBox.NoShowAll = true;
            CompactGuiLevel   = 2;
            dockBarTop.UpdateVisibility();
            dockBarBottom.UpdateVisibility();
            dockBarLeft.UpdateVisibility();
            dockBarRight.UpdateVisibility();
        }
コード例 #5
0
        Widget CreateExceptionValueTreeView()
        {
            ExceptionValueTreeView       = new ObjectValueTreeView();
            ExceptionValueTreeView.Frame = DebuggingService.CurrentFrame;
            ExceptionValueTreeView.ModifyBase(StateType.Normal, Styles.ExceptionCaughtDialog.ValueTreeBackgroundColor.ToGdkColor());
            ExceptionValueTreeView.AllowPopupMenu = false;
            ExceptionValueTreeView.AllowExpanding = true;
            ExceptionValueTreeView.AllowPinning   = false;
            ExceptionValueTreeView.AllowEditing   = false;
            ExceptionValueTreeView.AllowAdding    = false;
            ExceptionValueTreeView.RulesHint      = true;
            ExceptionValueTreeView.ModifyFont(Pango.FontDescription.FromString(Platform.IsWindows ? "9" : "11"));
            ExceptionValueTreeView.RulesHint = false;

            ExceptionValueTreeView.Show();

            var scrolled = new ScrolledWindow {
                HeightRequest    = 180,
                HscrollbarPolicy = PolicyType.Automatic,
                VscrollbarPolicy = PolicyType.Automatic
            };

            scrolled.ShadowType = ShadowType.None;
            scrolled.Add(ExceptionValueTreeView);
            scrolled.Show();
            var vbox = new VBox();

            expanderProperties = WrapInExpander(GettextCatalog.GetString("Properties"), scrolled);
            vbox.PackStart(new VBox(), false, false, 5);
            vbox.PackStart(expanderProperties, true, true, 0);
            vbox.ShowAll();
            return(vbox);
        }
コード例 #6
0
ファイル: TextVisualizer.cs プロジェクト: thild/monodevelop
        public Gtk.Widget GetVisualizerWidget(ObjectValue val)
        {
            VBox box = new VBox(false, 6);

            textView             = new TextView();
            textView.Buffer.Text = val.GetRawValue() as string;
            textView.WrapMode    = WrapMode.Char;
            Gtk.ScrolledWindow scrolled = new Gtk.ScrolledWindow();
            scrolled.HscrollbarPolicy = PolicyType.Automatic;
            scrolled.VscrollbarPolicy = PolicyType.Automatic;
            scrolled.ShadowType       = ShadowType.In;
            scrolled.Add(textView);
            box.PackStart(scrolled, true, true, 0);
            CheckButton cb = new CheckButton(GettextCatalog.GetString("Wrap text"));

            cb.Active   = true;
            cb.Toggled += delegate {
                if (cb.Active)
                {
                    textView.WrapMode = WrapMode.Char;
                }
                else
                {
                    textView.WrapMode = WrapMode.None;
                }
            };
            box.PackStart(cb, false, false, 0);
            box.ShowAll();
            return(box);
        }
コード例 #7
0
ファイル: ProgressDialog.cs プロジェクト: dstaley/ipod-sharp
        public ProgressDialog(Window parent) : base()
        {
            this.Title        = "Updating iPod...";
            this.HasSeparator = false;
            this.TransientFor = parent;
            this.DefaultWidth = 400;

            VBox vbox = new VBox(false, 6);

            vbox.BorderWidth = 6;

            HBox hbox = new HBox(false, 6);

            Gdk.PixbufAnimation animation = new Gdk.PixbufAnimation(Assembly.GetExecutingAssembly(),
                                                                    "ipod.gif");
            hbox.PackStart(new Gtk.Image(animation), false, false, 0);

            label           = new Label("");
            label.Xalign    = 0.0f;
            label.UseMarkup = true;

            SetEllipsize(label);
            hbox.PackStart(label, true, true, 0);

            vbox.PackStart(hbox, true, false, 0);

            bar = new ProgressBar();
            vbox.PackStart(bar, true, false, 0);

            VBox.PackStart(vbox, false, false, 0);
            VBox.ShowAll();

            notify = new ThreadNotify(new ReadyEvent(OnNotify));
        }
コード例 #8
0
 private void UpdateCoverArtDisplay()
 {
     if (ShowCoverArt.Get())
     {
         if (cover_art_display == null && source_box != null)
         {
             cover_art_display = new CoverArtDisplay()
             {
                 Visible = true
             };
             source_box.SizeAllocated                += OnSourceBoxSizeAllocated;
             cover_art_display.HeightRequest          = SourceViewWidth.Get();
             source_box.PackStart(cover_art_container = TrackInfoDisplay.GetEditable(cover_art_display), false, false, 4);
             source_box.ShowAll();
         }
     }
     else if (cover_art_display != null)
     {
         cover_art_display.Hide();
         source_box.Remove(cover_art_container);
         source_box.SizeAllocated -= OnSourceBoxSizeAllocated;
         cover_art_display.Dispose();
         cover_art_display = null;
     }
 }
コード例 #9
0
        private void AddTeamNamesWidget()
        {
            Gtk.Frame sframe, tframe;
            EventBox  ebox;

            sframe = new Gtk.Frame("<b>" + Catalog.GetString("Shield") + "</b>");
            (sframe.LabelWidget as Label).UseMarkup = true;
            sframe.ShadowType = ShadowType.None;
            tframe            = new Gtk.Frame("<b>" + Catalog.GetString("Team Name") + "</b>");
            (tframe.LabelWidget as Label).UseMarkup = true;
            tframe.ShadowType = ShadowType.None;

            ebox = new EventBox();
            ebox.ButtonPressEvent += OnImageClicked;

            shieldImage        = new Gtk.Image();
            shieldImage.Pixbuf = IconLoader.LoadIcon(this, "gtk-execute", IconSize.Dialog);
            box = new VBox();

            teamentry          = new Entry();
            teamentry.Changed += delegate(object sender, EventArgs e) {
                Template.TeamName = teamentry.Text;
            };

            sframe.Add(ebox);
            ebox.Add(shieldImage);
            tframe.Add(teamentry);

            box.PackStart(sframe, false, false, 0);
            box.PackStart(tframe, false, false, 0);
            box.ShowAll();
            box.Sensitive = false;
            AddUpperWidget(box);
        }
コード例 #10
0
        public DockFrame()
        {
            HandleSize        = 4;
            HandlePadding     = 2;
            DefaultItemWidth  = 300;
            DefaultItemHeight = 250;
            AutoShowDelay     = 400;
            AutoHideDelay     = 500;
            TabType           = TabAlgorithm.Proven;

            dockBarTop    = new DockBar(this, Gtk.PositionType.Top);
            dockBarBottom = new DockBar(this, Gtk.PositionType.Bottom);
            dockBarLeft   = new DockBar(this, Gtk.PositionType.Left);
            dockBarRight  = new DockBar(this, Gtk.PositionType.Right);

            container = new DockContainer(this);
            HBox hbox = new HBox();

            hbox.PackStart(dockBarLeft, false, false, 0);
            hbox.PackStart(container, true, true, 0);
            hbox.PackStart(dockBarRight, false, false, 0);
            mainBox = new VBox();
            mainBox.PackStart(dockBarTop, false, false, 0);
            mainBox.PackStart(hbox, true, true, 0);
            mainBox.PackStart(dockBarBottom, false, false, 0);
            Add(mainBox);
            mainBox.ShowAll();
            mainBox.NoShowAll = true;
            dockBarTop.UpdateVisibility();
            dockBarBottom.UpdateVisibility();
            dockBarLeft.UpdateVisibility();
            dockBarRight.UpdateVisibility();

            DefaultVisualStyle = new DockVisualStyle();
        }
コード例 #11
0
        static public bool NewVersionAvailable(Version currentVersion, Version latestVersion,
                                               string downloadURL, string changeLog, Widget parent = null)
        {
            string message = string.Format(
                Catalog.GetString("Version {0} is available!\n" +
                                  "(You are using version {1})\n" +
                                  "<a href=\"{2}\">Click here to get it.</a>"),
                latestVersion, currentVersion, downloadURL);

            bool checkState = false;

            PopupMessage(parent, MessageType.Info, message, (dialog) => {
                dialog.Title = Catalog.GetString("New version available");
                VBox vbox    = dialog.MessageDialogGetMessageArea();

                var expander = new Gtk.Expander(Catalog.GetString("Changes:"));
                expander.Add(new Label(changeLog));
                vbox.Add(expander);

                var check      = new CheckButton(Catalog.GetString("Do not notify me again until next version"));
                check.Toggled += delegate {
                    checkState = check.Active;
                };
                vbox.Add(check);

                vbox.ShowAll();
            });

            return(checkState);
        }
コード例 #12
0
        public override Control CreatePanelWidget()
        {
            var vbox = new VBox {
                Spacing = 6
            };

            var sectionLabel = new Label("<b>General</b>")
            {
                Xalign = 0, UseMarkup = true
            };

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

            vbox.PackStart(enableButton, false, false, 0);
            vbox.PackStart(showFile, false, false, 0);
            vbox.PackStart(showProject, false, false, 0);
            vbox.PackStart(showElapsed, false, false, 0);

            var id = new HBox {
                BorderWidth = 10, Spacing = 6
            };
            var idLabel = new Label("Application ID:")
            {
                Xalign = 0
            };

            id.PackStart(idLabel, false, false, 0);
            id.PackStart(appId, true, true, 0);

            vbox.PackStart(id, false, false, 0);
            vbox.ShowAll();
            return(vbox);
        }
コード例 #13
0
        protected GroupsEditPanel(bool multiSelect = false)
        {
            gPanel = new GroupsPanel <T> (multiSelect);
            Viewport vPort = new Viewport {
                ShadowType = ShadowType.EtchedIn
            };

            vPort.Add(gPanel);
            PackStart(vPort, true, true, 0);
            PackStart(buttonsBox, false, true, 4);

            buttonsBox.Spacing = 2;
            btnNew             = CreateButton(Translator.GetString("New", "Group"), "Icons.New24.png");
            btnEdit            = CreateButton(Translator.GetString("Edit"), "Icons.Edit24.png");
            btnDelete          = CreateButton(Translator.GetString("Delete"), "Icons.Delete24.png");

            btnNew.Clicked    += btnNew_Clicked;
            btnEdit.Clicked   += btnEdit_Clicked;
            btnDelete.Clicked += btnDelete_Clicked;

            buttonsBox.PackStart(btnNew, false, false, 0);
            buttonsBox.PackStart(btnEdit, false, false, 0);
            buttonsBox.PackStart(btnDelete, false, false, 0);

            vPort.ShowAll();
            buttonsBox.ShowAll();

            ReloadGroups();
        }
コード例 #14
0
ファイル: WelcomePanel.cs プロジェクト: kuggaa/longomatch
        Widget CreateButton(WelcomeButton b)
        {
            Button button;
            VBox   box;

            Gtk.Image     image;
            Gtk.Alignment alignment;
            Label         label;

            image = new Gtk.Image(
                Helpers.Misc.LoadIcon(b.name, StyleConf.WelcomeIconImageSize, 0));

            button               = new Button();
            button.Clicked      += (sender, e) => (b.func());
            button.HeightRequest = StyleConf.WelcomeIconSize;
            button.WidthRequest  = StyleConf.WelcomeIconSize;
            button.Add(image);

            alignment = new Alignment(0.5f, 0.5f, 0.0f, 0.0f);
            alignment.Add(button);

            label              = new Label(b.text);
            label.LineWrap     = true;
            label.LineWrapMode = Pango.WrapMode.Word;
            label.Justify      = Justification.Center;
            sizegroup.AddWidget(label);

            box = new VBox(false, StyleConf.WelcomeIconsTextSpacing);
            box.PackStart(alignment, false, false, 0);
            box.PackStart(label, false, false, 0);
            box.ShowAll();
            box.Name = b.name + "roundedbutton";
            return(box);
        }
コード例 #15
0
        private void BuildViews()
        {
            VBox source_box = new VBox();

            views_pane = new HPaned();
            PersistentPaneController.Control(views_pane, SourceViewWidth);
            view_container = new ViewContainer();

            source_view    = new SourceView();
            composite_view = new CompositeTrackSourceContents();

            Hyena.Widgets.ScrolledWindow source_scroll = new Hyena.Widgets.ScrolledWindow();
            source_scroll.AddWithFrame(source_view);

            composite_view.TrackView.HeaderVisible = false;
            view_container.Content = composite_view;

            source_box.PackStart(source_scroll, true, true, 0);
            source_box.PackStart(new UserJobTileHost(), false, false, 0);

            source_view.SetSizeRequest(125, -1);
            view_container.SetSizeRequest(425, -1);

            views_pane.Pack1(source_box, false, false);
            views_pane.Pack2(view_container, true, false);

            source_box.ShowAll();
            view_container.Show();
            views_pane.Show();

            primary_vbox.PackStart(views_pane, true, true, 0);
        }
コード例 #16
0
        private void Build()
        {
            // Section label + line
            var hbox1 = new HBox(false, 6);

            var label = new Label {
                LabelProp = Pinta.Core.Translations.GetString("Random Noise")
            };

            hbox1.PackStart(label, false, false, 0);
            hbox1.PackStart(new HSeparator(), true, true, 0);

            // Reseed button
            button = new Button {
                WidthRequest = 88,
                CanFocus     = true,
                UseUnderline = true,
                Label        = Pinta.Core.Translations.GetString("Reseed")
            };

            var hbox2 = new HBox(false, 6);

            hbox2.PackStart(button, false, false, 0);

            // Main layout
            var vbox = new VBox(false, 6)
            {
                hbox1,
                hbox2
            };

            Add(vbox);

            vbox.ShowAll();
        }
コード例 #17
0
        private void BuildPrimaryLayout()
        {
            main_vbox = new VBox();

            Widget menu = new MainMenu();

            menu.Show();
            main_vbox.PackStart(menu, false, false, 0);

            BuildHeader();

            content_vbox         = new VBox();
            content_vbox.Spacing = 6;
            Alignment content_align = new Alignment(0f, 0f, 1f, 1f);

            content_align.LeftPadding = content_align.RightPadding = 6;
            content_align.Child       = content_vbox;
            main_vbox.PackStart(content_align, true, true, 0);

            BuildTrackInfo();
            BuildViews();

            main_vbox.ShowAll();
            Add(main_vbox);
        }
コード例 #18
0
        public DockFrame()
        {
            Mono.TextEditor.GtkWorkarounds.FixContainerLeak(this);

            dockBarTop    = new DockBar(this, Gtk.PositionType.Top);
            dockBarBottom = new DockBar(this, Gtk.PositionType.Bottom);
            dockBarLeft   = new DockBar(this, Gtk.PositionType.Left);
            dockBarRight  = new DockBar(this, Gtk.PositionType.Right);

            container = new DockContainer(this);
            HBox hbox = new HBox();

            hbox.PackStart(dockBarLeft, false, false, 0);
            hbox.PackStart(container, true, true, 0);
            hbox.PackStart(dockBarRight, false, false, 0);
            mainBox = new VBox();
            mainBox.PackStart(dockBarTop, false, false, 0);
            mainBox.PackStart(hbox, true, true, 0);
            mainBox.PackStart(dockBarBottom, false, false, 0);
            Add(mainBox);
            mainBox.ShowAll();
            mainBox.NoShowAll = true;
            CompactGuiLevel   = 2;
            dockBarTop.UpdateVisibility();
            dockBarBottom.UpdateVisibility();
            dockBarLeft.UpdateVisibility();
            dockBarRight.UpdateVisibility();

            DefaultVisualStyle = new DockVisualStyle();
        }
        public OpenRemoteServer() : base(Catalog.GetString("Open remote DAAP server"), null)
        {
            VBox.Spacing = 6;
            VBox.PackStart(new Label()
            {
                Xalign = 0.0f,
                Text   = Catalog.GetString("Enter server IP address and port:")
            }, true, true, 0);

            HBox box = new HBox();

            box.Spacing = 12;
            VBox.PackStart(box, false, false, 0);

            address_entry = ComboBoxEntry.NewText();
            address_entry.Entry.Activated += OnEntryActivated;
            address_entry.Entry.WidthChars = 30;
            address_entry.Show();

            port_entry       = new SpinButton(1d, 65535d, 1d);
            port_entry.Value = 3689;
            port_entry.Show();

            box.PackStart(address_entry, true, true, 0);
            box.PackEnd(port_entry, false, false, 0);

            address_entry.HasFocus = true;

            VBox.ShowAll();

            AddStockButton(Stock.Cancel, ResponseType.Cancel);
            AddStockButton(Stock.Add, ResponseType.Ok, true);

            LoadHistory();
        }
コード例 #20
0
        public Variable(Wrappers.Network network, Widgets.Window parent, Wrappers.Wrapper obj)
        {
            d_object = obj;

            DestroyWithParent = true;
            TransientFor      = parent;
            HasSeparator      = false;

            if (obj is Wrappers.Edge)
            {
                SetDefaultSize(600, 300);
            }
            else
            {
                SetDefaultSize(400, 300);
            }

            d_view             = new Widgets.Editors.Wrapper(d_object, parent.Actions, network);
            d_view.BorderWidth = 6;

            VBox.PackStart(d_view, true, true, 0);

            d_object.VariableChanged += delegate(Wrappers.Wrapper source, Cdn.Variable name) {
                UpdateTitle();
            };

            VBox.ShowAll();

            AddButton(Gtk.Stock.Close, ResponseType.Close);
            UpdateTitle();
        }
コード例 #21
0
        public OpenLocationDialog() : base(Catalog.GetString("Open Location"))
        {
            var location_box = new HBox()
            {
                Spacing = 6
            };

            address_entry = ComboBoxEntry.NewText();
            address_entry.Entry.Activated += (o, e) => Respond(ResponseType.Ok);

            var browse_button = new Button(Catalog.GetString("Browse..."));

            browse_button.Clicked += OnBrowseClicked;

            location_box.PackStart(address_entry, true, true, 0);
            location_box.PackStart(browse_button, false, false, 0);

            VBox.Spacing = 6;
            VBox.PackStart(new Label()
            {
                Xalign = 0.0f,
                Text   = Catalog.GetString(
                    "Enter the address of the file you would like to open:")
            }, false, false, 0);
            VBox.PackStart(location_box, false, false, 0);
            VBox.ShowAll();

            AddStockButton(Stock.Cancel, ResponseType.Cancel);
            AddStockButton(Stock.Open, ResponseType.Ok, true);

            LoadHistory();

            address_entry.Entry.HasFocus = true;
        }
コード例 #22
0
        public ClockThemeSelector(ClockDockItem dockItem)
        {
            DockItem = dockItem;

            SkipTaskbarHint = true;
            TypeHint        = Gdk.WindowTypeHint.Dialog;
            WindowPosition  = Gtk.WindowPosition.Center;
            KeepAbove       = true;
            Stick();

            Title    = Catalog.GetString("Themes");
            IconName = Gtk.Stock.Preferences;

            AddButton(Stock.Close, ResponseType.Close);

            labelTreeView.Model              = labelTreeStore;
            labelTreeView.HeadersVisible     = false;
            labelTreeView.Selection.Changed += OnLabelSelectionChanged;
            labelTreeView.AppendColumn(Catalog.GetString("Theme"), new CellRendererText(), "text", 0);

            ScrolledWindow win = new ScrolledWindow();

            win.Add(labelTreeView);
            win.SetSizeRequest(200, 300);
            win.Show();
            VBox.PackEnd(win);
            VBox.ShowAll();

            UpdateThemeList();
        }
コード例 #23
0
        void CheckCreateSubViewContents()
        {
            if (subViewContents != null)
            {
                return;
            }

            subViewContents = new List <IAttachableViewContent> ();

            box.Remove(this.ViewContent.Control);

            subViewNotebook            = new Notebook();
            subViewNotebook.TabPos     = PositionType.Bottom;
            subViewNotebook.ShowTabs   = false;
            subViewNotebook.ShowBorder = false;
            subViewNotebook.Show();
            subViewNotebook.SwitchPage += subViewNotebookIndexChanged;

            //add existing ViewContent
            AddButton(this.ViewContent.TabPageLabel, this.ViewContent.Control).Active = true;

            //pack them in a box
            box.PackStart(subViewNotebook, true, true, 0);
            box.ShowAll();
        }
コード例 #24
0
        private void UpdateAllFuelBalance()
        {
            if (allBalanceVBox != null)
            {
                allBalanceVBox.Destroy();
            }
            allBalanceVBox = new VBox();

            var itemHBox     = new HBox();
            var itemVoxLeft  = new VBox();
            var itemVoxRight = new VBox();

            foreach (var item in ViewModel.AllFuelsBalance)
            {
                itemVoxLeft.Add(new Label {
                    LabelProp = $"{item.Key.Name}:", Xalign = 0
                });
                itemVoxRight.Add(new Label {
                    LabelProp = $"{item.Value.ToString(" 0.##")} л.", Xalign = 0
                });
            }
            itemHBox.Add(itemVoxLeft);
            itemHBox.Add(itemVoxRight);
            allBalanceVBox.Add(itemHBox);

            allBalanceVBox.ShowAll();
            vboxAllBalance.Add(allBalanceVBox);
        }
コード例 #25
0
        public TrackInfoPopup() : base(Gtk.WindowType.Popup)
        {
            BorderWidth  = 8;
            AppPaintable = true;
            Resizable    = false;
            TypeHint     = Gdk.WindowTypeHint.Notification;

            VBox box = new VBox();

            box.Spacing = 4;

            header = new ClassicTrackInfoDisplay();
            header.SetSizeRequest(320, 64);

            seek_slider = new ConnectedSeekSlider(SeekSliderLayout.Horizontal);
            seek_slider.StreamPositionLabel.FormatString = "<small>{0}</small>";
            seek_slider.LeftPadding  = 0;
            seek_slider.RightPadding = 0;

            box.PackStart(header, true, true, 0);
            box.PackStart(seek_slider, false, false, 0);

            Add(box);
            box.ShowAll();
        }
コード例 #26
0
ファイル: SparkleLog.cs プロジェクト: Dieterbe/SparkleShare
        private void AddHTML()
        {
            Application.Invoke(delegate {
                if (Spinner.Active)
                {
                    LayoutVertical.Remove(Spinner);
                    Spinner.Stop();
                }
                else
                {
                    LayoutVertical.Remove(ScrolledWindow);
                }

                ScrolledWindow = new ScrolledWindow()
                {
                    HscrollbarPolicy = PolicyType.Never
                };

                Viewport viewport = new Viewport();
                WebView.Reparent(viewport);
                ScrolledWindow.Add(viewport);
                (ScrolledWindow.Child as Viewport).ShadowType = ShadowType.None;
                LayoutVertical.PackStart(ScrolledWindow, true, true, 0);
                LayoutVertical.ReorderChild(ScrolledWindow, 0);

                WebView.LoadString(HTML, null, null, "file://");

                LayoutVertical.ShowAll();
            });
        }
コード例 #27
0
        public ArtworkPopup() : base(Gtk.WindowType.Popup)
        {
            VBox vbox = new VBox();

            Add(vbox);

            Decorated   = false;
            BorderWidth = 6;

            SetPosition(WindowPosition.CenterAlways);

            image          = new Gtk.Image();
            label          = new Label(String.Empty);
            label.CanFocus = false;
            label.Wrap     = true;

            label.ModifyBg(StateType.Normal, new Color(0, 0, 0));
            label.ModifyFg(StateType.Normal, new Color(160, 160, 160));
            ModifyBg(StateType.Normal, new Color(0, 0, 0));
            ModifyFg(StateType.Normal, new Color(160, 160, 160));

            vbox.PackStart(image, true, true, 0);
            vbox.PackStart(label, false, false, 0);

            vbox.Spacing = 6;
            vbox.ShowAll();
        }
コード例 #28
0
        private void Build()
        {
            // Section label + line
            var hbox1 = new HBox(false, 6);

            var label = new Label();

            label.LabelProp = Mono.Unix.Catalog.GetString("Random Noise");

            hbox1.PackStart(label, false, false, 0);
            hbox1.PackStart(new HSeparator(), true, true, 0);

            // Reseed button
            button1 = new Button();
            button1.WidthRequest = 88;
            button1.CanFocus     = true;
            button1.UseUnderline = true;
            button1.Label        = Mono.Unix.Catalog.GetString("Reseed");

            var hbox2 = new HBox(false, 6);

            hbox2.PackStart(button1, false, false, 0);

            // Main layout
            var vbox = new VBox(false, 6);

            vbox.Add(hbox1);
            vbox.Add(hbox2);

            Add(vbox);

            vbox.ShowAll();
        }
コード例 #29
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();
        }
コード例 #30
0
        public WindowShell(string name, string title, int width, int height, bool maximize) : base(WindowType.Toplevel)
        {
            Name          = name;
            Title         = title;
            DefaultWidth  = width;
            DefaultHeight = height;

            WindowPosition = WindowPosition.Center;
            AllowShrink    = true;

            if (maximize)
            {
                Maximize();
            }

            shell_layout = new VBox()
            {
                Name = "shell_layout"
            };
            menu_layout = new VBox()
            {
                Name = "menu_layout"
            };

            shell_layout.PackStart(menu_layout, false, false, 0);

            Add(shell_layout);

            shell_layout.ShowAll();
        }
コード例 #31
0
            public ChessGameInfoWidget()
            {
                box = new VBox ();
                titleLabel = new Label ();
                titleLabel.UseMarkup = true;

                resultLabel =
                    new Label (Catalog.
                           GetString
                           ("<b>Result</b>"));
                resultLabel.UseMarkup = true;
                dateLabel =
                    new Label (Catalog.
                           GetString ("<b>Date</b>"));
                dateLabel.UseMarkup = true;
                eventLabel =
                    new Label (Catalog.
                           GetString
                           ("<b>Event</b>"));
                eventLabel.UseMarkup = true;
                siteLabel =
                    new Label (Catalog.
                           GetString ("<b>Site</b>"));
                siteLabel.UseMarkup = true;

                resultValueLabel = new Label ();
                dateValueLabel = new Label ();
                eventValueLabel = new Label ();
                siteValueLabel = new Label ();

                titleLabel = new Label ();
                titleLabel.UseMarkup = true;

                Table table = new Table (5, 2, false);

                uint row = 0;
                  table.Attach (titleLabel, 0, 2, row,
                        row + 1);
                  titleLabel.Xalign = 0;

                  row++;
                  table.Attach (resultLabel, 0, 1, row,
                        row + 1);
                  resultLabel.Xalign = 0;
                  table.Attach (resultValueLabel, 1, 2, row,
                        row + 1);
                  resultValueLabel.Xalign = 0;

                  row++;
                  table.Attach (dateLabel, 0, 1, row,
                        row + 1);
                  dateLabel.Xalign = 0;
                  table.Attach (dateValueLabel, 1, 2, row,
                        row + 1);
                  dateValueLabel.Xalign = 0;

                  row++;
                  table.Attach (eventLabel, 0, 1, row,
                        row + 1);
                  eventLabel.Xalign = 0;
                  table.Attach (eventValueLabel, 1, 2, row,
                        row + 1);
                  eventValueLabel.Xalign = 0;

                  row++;
                  table.Attach (siteLabel, 0, 1, row,
                        row + 1);
                  siteLabel.Xalign = 0;
                  table.Attach (siteValueLabel, 1, 2, row,
                        row + 1);
                  siteValueLabel.Xalign = 0;

                ScrolledWindow win = new ScrolledWindow ();
                  win.HscrollbarPolicy = PolicyType.Automatic;
                  win.VscrollbarPolicy = PolicyType.Never;
                  win.AddWithViewport (table);

                  box.PackStart (win, false, false, 2);

                  otherTagsWidget =
                    new Expander (Catalog.
                              GetString
                              ("Other details"));
                  box.PackStart (otherTagsWidget, false,
                         false, 2);

                  box.ShowAll ();
                  Child = box;
            }