コード例 #1
0
ファイル: ItemInfo.cs プロジェクト: balihb/basenji
            public PropertyBox(ItemInfo owner) : base(false, 12)
            {
                this.owner = owner;

                this.captionLbls = new Label[MAX_ITEM_PROPERTIES];
                this.valueLbls   = new Label[MAX_ITEM_PROPERTIES];

                this.lblName           = WindowBase.CreateLabel(string.Empty, true);
                this.lblName.Ellipsize = Pango.EllipsizeMode.End;

                this.tbls = new Table[WIDTH];
                this.hbox = new HBox(false, 12);

                for (int i = 0; i < WIDTH; i++)
                {
                    this.tbls[i] = WindowBase.CreateTable(HEIGHT, 2, 6);                     // 2 = caption + value
                    this.hbox.PackStart(tbls[i], true, true, 0);
                }

                int tbl = 0, y = 0;

                for (int i = 0; i < MAX_ITEM_PROPERTIES; i++, y++)
                {
                    if (i == HEIGHT)
                    {
                        y = 0;
                        tbl++;
                    }

                    // create caption label
                    this.captionLbls[i] = WindowBase.CreateLabel(string.Empty, true);

                    // create value label
                    this.valueLbls[i]           = WindowBase.CreateLabel(string.Empty, false);
                    this.valueLbls[i].Ellipsize = Pango.EllipsizeMode.End;

                    // attach caption and value labels to the table
                    WindowBase.TblAttach(tbls[tbl], captionLbls[i], 0, y);
                    this.tbls[tbl].Attach(valueLbls[i], 1, 2, (uint)y, (uint)(y + 1));
                }

                // custom button
                HBox hb = new HBox(false, 6);

                this.btnArrow = new Arrow(ArrowType.Down, ShadowType.None);
                hb.PackStart(btnArrow, false, false, 0);
                hb.PackStart(lblName, true, true, 0);

                Button btn = new Button(hb);

                btn.Clicked += OnBtnClicked;

                this.PackStart(btn, true, false, 0);
                this.PackStart(hbox, true, true, 0);
            }
コード例 #2
0
        protected override void AddInfoLabels(List <InfoLabel> infoLabels)
        {
            lblItemType       = WindowBase.CreateLabel();
            lblName           = WindowBase.CreateLabel();
            lblName.Ellipsize = Pango.EllipsizeMode.End;

            infoLabels.AddRange(new InfoLabel[] {
                new InfoLabel(S._("Item type") + ":", lblItemType),
                new InfoLabel(S._("Name") + ":", lblName),
            });
        }
コード例 #3
0
        protected override void AddInfoLabels(List <InfoLabel> infoLabels)
        {
            base.AddInfoLabels(infoLabels);

            lblTracks   = WindowBase.CreateLabel();
            lblDuration = WindowBase.CreateLabel();

            infoLabels.AddRange(new InfoLabel[] {
                new InfoLabel(S._("Tracks:"), lblTracks),
                new InfoLabel(S._("Duration:"), lblDuration),
            });
        }
コード例 #4
0
        protected override void AddInfoLabels(List <InfoLabel> infoLabels)
        {
            base.AddInfoLabels(infoLabels);

            lblDuration = WindowBase.CreateLabel();
            lblMimeType = WindowBase.CreateLabel();

            infoLabels.AddRange(new InfoLabel[] {
                new InfoLabel(S._("Duration") + ":", lblDuration),
                new InfoLabel(S._("Type") + ":", lblMimeType)
            });
        }
コード例 #5
0
ファイル: VolumeEditor.cs プロジェクト: balihb/basenji
        protected override void AddInfoLabels(List <InfoLabel> infoLabels)
        {
            lblVolumeType = WindowBase.CreateLabel();
            lblHashed     = WindowBase.CreateLabel();
            lblAdded      = WindowBase.CreateLabel();

            infoLabels.AddRange(new InfoLabel[] {
                new InfoLabel(S._("Volume type:"), lblVolumeType),
                new InfoLabel(S._("Hashed:"), lblHashed),
                new InfoLabel(S._("Added:"), lblAdded)
            });
        }
コード例 #6
0
        protected override void AddInfoLabels(List <InfoLabel> infoLabels)
        {
            base.AddInfoLabels(infoLabels);

            lblSize = WindowBase.CreateLabel();
            lblHash = WindowBase.CreateLabel();

            infoLabels.AddRange(new InfoLabel[] {
                new InfoLabel(S._("Size") + ":", lblSize),
                new InfoLabel(S._("Hash") + ":", lblHash)
            });
        }
コード例 #7
0
        protected override void AddInfoLabels(List <InfoLabel> infoLabels)
        {
            base.AddInfoLabels(infoLabels);

            lblFiles       = WindowBase.CreateLabel();
            lblDirectories = WindowBase.CreateLabel();
            lblTotalSize   = WindowBase.CreateLabel();

            infoLabels.AddRange(new InfoLabel[] {
                new InfoLabel(S._("Files:"), lblFiles),
                new InfoLabel(S._("Directories:"), lblDirectories),
                new InfoLabel(S._("Total size:"), lblTotalSize)
            });
        }
コード例 #8
0
        protected override void AddInfoLabels(List <InfoLabel> infoLabels)
        {
            base.AddInfoLabels(infoLabels);

            lblLocation           = WindowBase.CreateLabel();
            lblLocation.Ellipsize = Pango.EllipsizeMode.End;

            lblLastWriteTime      = WindowBase.CreateLabel();
            lblMimeType           = WindowBase.CreateLabel();
            lblMimeType.Ellipsize = Pango.EllipsizeMode.End;

            infoLabels.AddRange(new InfoLabel[] {
                new InfoLabel(S._("Location") + ":", lblLocation),
                new InfoLabel(S._("Last write time") + ":", lblLastWriteTime),
                new InfoLabel(S._("Filetype") + ":", lblMimeType)
            });
        }