CmisSync.SetupWindow.Add C# (CSharp) Method

Add() private method

private Add ( Widget widget ) : void
widget Widget
return void
        new public void Add(Widget widget) {
            Label header = new Label("<span size='large'><b>" + this.Header + "</b></span>") {
                UseMarkup = true,
                Xalign = 0,
            };

            VBox layout_vertical = new VBox(false, 0);
            layout_vertical.PackStart(new Label(string.Empty), false, false, 6);
            layout_vertical.PackStart(header, false, false, 0);

            if (!string.IsNullOrEmpty(this.Description)) {
                Label description = new Label(this.Description) {
                    Xalign = 0,
                    LineWrap = true,
                    LineWrapMode = Pango.WrapMode.WordChar
                };

                layout_vertical.PackStart(description, false, false, 21);
            }

            if (widget != null) {
                layout_vertical.PackStart(widget, true, true, 0);
            }

            this.wrapper.PackStart(layout_vertical, true, true, 0);
            this.ShowAll();
        }