Exemplo n.º 1
0
        public LibraryRowItemPart(LibraryProvider libraryProvider, int itemIndex, LibraryDataView libraryDataView, GuiWidget thumbnailWidget)
            : base(libraryDataView, thumbnailWidget)
        {
            thumbnailWidth = thumbnailWidget.Width;
            var widget = thumbnailWidget as IClickable;

            if (widget != null)
            {
                widget.Click += onViewPartClick;
            }

            this.ItemName = libraryProvider.GetPrintItemName(itemIndex);
            if (this.ItemName == LibraryRowItem.LoadingPlaceholderToken)
            {
                this.ItemName             = "Retrieving Contents...".Localize();
                this.IsViewHelperItem     = true;
                this.EnableSlideInActions = false;
            }

            this.libraryProvider = libraryProvider;
            this.ItemIndex       = itemIndex;

            CreateGuiElements();

            AddLoadingProgressBar();

            libraryProvider.RegisterForProgress(itemIndex, ReportProgressRatio);
        }
Exemplo n.º 2
0
        public LibraryRowItemPart(LibraryProvider libraryProvider, int itemIndex, LibraryDataView libraryDataView, GuiWidget thumbnailWidget)
            : base(libraryDataView, thumbnailWidget)
        {
            thumbnailWidth = thumbnailWidget.Width;
            var widget = thumbnailWidget as IClickable;

            if (widget != null)
            {
                widget.Click += onViewPartClick;
            }

            this.ItemName        = libraryProvider.GetPrintItemName(itemIndex);
            this.libraryProvider = libraryProvider;
            this.ItemIndex       = itemIndex;

            CreateGuiElements();

            AddLoadingProgressBar();

            libraryProvider.RegisterForProgress(itemIndex, ReportProgressRatio);
        }